aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2018-03-01 21:09:24 -0800
committerJeremy Daer <jeremydaer@gmail.com>2018-03-01 22:42:51 -0800
commit4b42c7e52aa23081ce02ffad53c76ab786214e87 (patch)
tree3ce3c19d1b336c490cdbf2d8a5f93716480f1939 /actionpack
parent6a029624009eee9fab04c186ccbe06862f5a231f (diff)
downloadrails-4b42c7e52aa23081ce02ffad53c76ab786214e87.tar.gz
rails-4b42c7e52aa23081ce02ffad53c76ab786214e87.tar.bz2
rails-4b42c7e52aa23081ce02ffad53c76ab786214e87.zip
Ruby 2.4: take advantage of String#unpack1
https://bugs.ruby-lang.org/issues/12752 https://ruby-doc.org/core-2.4.0/String.html#method-i-unpack1
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/routing_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 9c0e101f7c..259f3b8855 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -23,7 +23,7 @@ class UriReservedCharactersRoutingTest < ActiveSupport::TestCase
end
safe, unsafe = %w(: @ & = + $ , ;), %w(^ ? # [ ])
- hex = unsafe.map { |char| "%" + char.unpack("H2").first.upcase }
+ hex = unsafe.map { |char| "%" + char.unpack1("H2").upcase }
@segment = "#{safe.join}#{unsafe.join}".freeze
@escaped = "#{safe.join}#{hex.join}".freeze