diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-27 20:57:26 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-27 20:57:26 -0300 |
commit | 197a995bc548e206bb907c40d75f8ed70fa5a923 (patch) | |
tree | cbfccffef28b604f2cf006e008e779189abed66b /activesupport/lib/active_support/core_ext/uri.rb | |
parent | 8adb24016d76a2257b79f4566de66e1b88e56c71 (diff) | |
download | rails-197a995bc548e206bb907c40d75f8ed70fa5a923.tar.gz rails-197a995bc548e206bb907c40d75f8ed70fa5a923.tar.bz2 rails-197a995bc548e206bb907c40d75f8ed70fa5a923.zip |
Move uri parser to AS as URI.parser method to reuse it in AP and ARes.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/uri.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/uri.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/uri.rb b/activesupport/lib/active_support/core_ext/uri.rb index b7fe0a6209..ee991e3439 100644 --- a/activesupport/lib/active_support/core_ext/uri.rb +++ b/activesupport/lib/active_support/core_ext/uri.rb @@ -20,3 +20,11 @@ if RUBY_VERSION >= '1.9' end end end + +module URI + class << self + def parser + @parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI + end + end +end |