Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created January 6, 2011 07:50
Show Gist options
  • Save jackdempsey/767660 to your computer and use it in GitHub Desktop.
Save jackdempsey/767660 to your computer and use it in GitHub Desktop.
~ > irb
RUVEruby-1.9.2-p0 > {foo: "bar"}
=> {:foo=>"bar"}
ruby-1.9.2-p0 > {foo : "bar"}
SyntaxError: (irb):2: syntax error, unexpected ':', expecting tASSOC
{foo : "bar"}
^
(irb):2: syntax error, unexpected '}', expecting $end
from /Users/jack/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'
ruby-1.9.2-p0 > {foo: "bar"}
=> {:foo=>"bar"}
ruby-1.9.2-p0 > {:foo: "bar"}
SyntaxError: (irb):4: syntax error, unexpected ':', expecting tASSOC
{:foo: "bar"}
^
(irb):4: syntax error, unexpected '}', expecting $end
from /Users/jack/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'
ruby-1.9.2-p0 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment