Permalink
Browse files

remove code for Ruby 1.8.x support

  • Loading branch information...
1 parent f0129da commit a1cffa6d5849b45f439be62742ccca1633dfc9bd Francesco Rodriguez committed Dec 19, 2012
Showing with 2 additions and 7 deletions.
  1. +2 −7 actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -31,13 +31,8 @@ module UriEscape
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

0 comments on commit a1cffa6

Please sign in to comment.