From 197a995bc548e206bb907c40d75f8ed70fa5a923 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Mon, 27 Sep 2010 20:57:26 -0300 Subject: Move uri parser to AS as URI.parser method to reuse it in AP and ARes. --- activesupport/lib/active_support/core_ext/uri.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport') 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 -- cgit v1.2.3