Ticket #10717: stringify_keys_patch.diff
| File stringify_keys_patch.diff, 0.6 kB (added by chuyeow, 8 months ago) |
|---|
-
lib/active_support/core_ext/hash/keys.rb
old new 13 13 # Destructively convert all keys to strings. 14 14 def stringify_keys! 15 15 keys.each do |key| 16 unless key.class.to_s == "String" # weird hack to make the tests run when string_ext_test.rb is also running 17 self[key.to_s] = self[key] 18 delete(key) 19 end 16 self[key.to_s] = delete(key) 20 17 end 21 18 self 22 19 end