class Hash
Public Instance Methods
stringify_keys()
click to toggle source
Return a new hash with all keys converted to strings.
# File lib/ext/hash.rb, line 6 def stringify_keys dup.stringify_keys! end
stringify_keys!()
click to toggle source
# File lib/ext/hash.rb, line 10 def stringify_keys! keys.each do |key| self[key.to_s] = delete(key) end self end