Skip to content

Instantly share code, notes, and snippets.

@makevoid
Created April 12, 2011 12:08
Show Gist options
  • Select an option

  • Save makevoid/915393 to your computer and use it in GitHub Desktop.

Select an option

Save makevoid/915393 to your computer and use it in GitHub Desktop.
ruby hash representation improvement
# ruby hash representation improvement (or fix)
ruby-1.9.2-head :001 > {a: "b"}
=> {:a=>"b"}
ruby-1.9.2-head :002 > {a: "b"}.to_s
=> "{:a=>\"b\"}"
should become:
ruby-1.9.2-head :001 > {a: "b"}
=> {a: "b"}
ruby-1.9.2-head :002 > {a: "b"}.to_s
=> "{a: \"b\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment