mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
String#[] doesn't return the byte representation on 1.9.2, we should use getbyte that was already added as a Ruby < 1.9 core_ext
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
fa96638bf2
commit
a822ce78b3
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ module ActiveSupport
|
|||
|
||||
private
|
||||
def escape_key(key)
|
||||
key = key.to_s.gsub(ESCAPE_KEY_CHARS){|match| "%#{match[0].to_s(16).upcase}"}
|
||||
key = key.to_s.gsub(ESCAPE_KEY_CHARS){|match| "%#{match.getbyte(0).to_s(16).upcase}"}
|
||||
key = "#{key[0, 213]}:md5:#{Digest::MD5.hexdigest(key)}" if key.size > 250
|
||||
key
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue