From: Denis de Bernardy Date: 2012-02-28T01:56:11+09:00 Subject: [ruby-core:42977] [ruby-trunk - Bug #6096][Open] Parser tweak - curly braces followed by a coma... Issue #6096 has been reported by Denis de Bernardy. ---------------------------------------- Bug #6096: Parser tweak - curly braces followed by a coma... https://bugs.ruby-lang.org/issues/6096 Author: Denis de Bernardy Status: Open Priority: Low Assignee: Category: Target version: ruby -v: 1.9.3 It would be sweet if ruby treated curly braces followed by a coma as a hash rather than as a coma: >> def foo(bar, baz) >> end => nil >> foo {}, :baz SyntaxError: (irb):3: syntax error, unexpected ',', expecting $end foo {}, :baz ^ from /opt/local/bin/irb:12:in `
' I keep forgetting and run into the issue on a regular basis when writing unit tests... aka: assert_equal {}, do_stuff -- http://bugs.ruby-lang.org/