diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router/utils.rb | 9 |
1 files changed, 2 insertions, 7 deletions
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 |