mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove code for Ruby 1.8.x support
This commit is contained in:
parent
f0129da385
commit
a1cffa6d58
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue