This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's face it. Ruby's Hash#to_s output isn't very useful. | |
# Here's a draft for a better version. | |
class Hash | |
def to_s | |
keys.inject([]) do |a, key| | |
a << "#{key}: #{fetch(key)}" | |
end.join(', ') | |
end | |
end |