From a1cffa6d5849b45f439be62742ccca1633dfc9bd Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Wed, 19 Dec 2012 17:52:50 -0500 Subject: remove code for Ruby 1.8.x support --- actionpack/lib/action_dispatch/journey/router/utils.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_dispatch/journey/router') diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb index a21b570013..56df459bfb 100644 --- a/actionpack/lib/action_dispatch/journey/router/utils.rb +++ b/actionpack/lib/action_dispatch/journey/router/utils.rb @@ -31,13 +31,8 @@ module ActionDispatch safe_pchar = "#{URI::REGEXP::PATTERN::UNRESERVED}#{reserved_pchar}" safe_segment = "#{safe_pchar}#{reserved_segment}" safe_fragment = "#{safe_pchar}#{reserved_fragment}" - if RUBY_VERSION >= '1.9' - UNSAFE_SEGMENT = Regexp.new("[^#{safe_segment}]", false).freeze - UNSAFE_FRAGMENT = Regexp.new("[^#{safe_fragment}]", false).freeze - else - UNSAFE_SEGMENT = Regexp.new("[^#{safe_segment}]", false, 'N').freeze - UNSAFE_FRAGMENT = Regexp.new("[^#{safe_fragment}]", false, 'N').freeze - end + UNSAFE_SEGMENT = Regexp.new("[^#{safe_segment}]", false).freeze + UNSAFE_FRAGMENT = Regexp.new("[^#{safe_fragment}]", false).freeze end Parser = URI.const_defined?(:Parser) ? URI::Parser.new : URI -- cgit v1.2.3