1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove 1.8 compatible code

This commit is contained in:
kennyj 2013-09-19 12:37:35 +09:00
parent 1ea4a892a8
commit f76340e42b

View file

@ -36,7 +36,7 @@ module ActionDispatch
UNSAFE_FRAGMENT = Regexp.new("[^#{safe_fragment}]", false).freeze UNSAFE_FRAGMENT = Regexp.new("[^#{safe_fragment}]", false).freeze
end end
Parser = URI.const_defined?(:Parser) ? URI::Parser.new : URI Parser = URI::Parser.new
def self.escape_path(path) def self.escape_path(path)
Parser.escape(path.to_s, UriEscape::UNSAFE_SEGMENT) Parser.escape(path.to_s, UriEscape::UNSAFE_SEGMENT)