diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 07:57:26 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-28 11:38:35 +0800 |
commit | 71acc2737aa346ee57f9fc21252a508ae83367a4 (patch) | |
tree | ddb12b7813d20b4003c874604620d0aef7ace31a /activesupport/lib/active_support | |
parent | b7934afe326f8bba9cdcacdfac93062dff155efe (diff) | |
download | rails-71acc2737aa346ee57f9fc21252a508ae83367a4.tar.gz rails-71acc2737aa346ee57f9fc21252a508ae83367a4.tar.bz2 rails-71acc2737aa346ee57f9fc21252a508ae83367a4.zip |
Move uri parser to AS as URI.parser method to reuse it in AP and ARes.
Diffstat (limited to 'activesupport/lib/active_support')
-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 |