Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created August 14, 2008 19:22
Show Gist options
  • Save Sutto/5471 to your computer and use it in GitHub Desktop.
Save Sutto/5471 to your computer and use it in GitHub Desktop.
class Hash
def recursively_stringify_keys
result = {}
self.each do |k,v|
result[k.to_s] = (v.is_a?(Hash) ? v.recursively_stringify_keys : v)
end
return result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment