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

Ruby 1.9 compat: don't rely on Array#to_s to flatten and join as string

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8590 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2008-01-07 08:12:34 +00:00
parent 7324444344
commit 07fcac508a

View file

@ -31,8 +31,8 @@ class UriReservedCharactersRoutingTest < Test::Unit::TestCase
safe, unsafe = %w(: @ & = + $ , ;), %w(^ / ? # [ ]) safe, unsafe = %w(: @ & = + $ , ;), %w(^ / ? # [ ])
hex = unsafe.map { |char| '%' + char.unpack('H2').first.upcase } hex = unsafe.map { |char| '%' + char.unpack('H2').first.upcase }
@segment = "#{safe}#{unsafe}".freeze @segment = "#{safe.join}#{unsafe.join}".freeze
@escaped = "#{safe}#{hex}".freeze @escaped = "#{safe.join}#{hex.join}".freeze
end end
def test_route_generation_escapes_unsafe_path_characters def test_route_generation_escapes_unsafe_path_characters