codefish.org
Why use symbols as hash keys in Ruby?
Question A lot of times people use symbols as keys in a Ruby hash. What’s the advantage over using a string? E.g.: hash[:name] vs. hash[‘name’] Answer Using symbols not only sa…