commas in ruby hash literals

# I didn't realize this was possible
# and I still don't know if I like it.
# However, there are reasons for this,
# like easy addition or moving of literal
# entries without thinking about commas

irb(main):001:0> {
irb(main):002:1*   :foo => :bar,
irb(main):003:1*   :baz => :bam,
irb(main):004:1* }
=> {:foo=>:bar, :baz=>:bam}


Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>