Skip to content

Instantly share code, notes, and snippets.

@mbj
Last active August 29, 2015 14:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbj/5917ebb6391395759d28 to your computer and use it in GitHub Desktop.
Save mbj/5917ebb6391395759d28 to your computer and use it in GitHub Desktop.
MRI 2.1.3 parser regression?
# chruby-exec 2.1.2 -- ruby y.rb
{:a=>:foo}
# chruby-exec 2.1.3 -- ruby y.rb
y.rb:2: syntax error, unexpected modifier_if
a: if true; :foo; end
^
y.rb:2: syntax error, unexpected keyword_end, expecting end-of-input
# not that I'd like this code. But its valid on 2.1.2 and invalid on 2.1.3. Found via mutant.
p(
a: if true; :foo; end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment