From: "dimitri-lo2u (Dimitri Geshef)" Date: 2013-07-12T15:55:48+09:00 Subject: [ruby-core:55971] [ruby-trunk - Bug #8628] Parse error with method argument that is a Hash with a specific pattern Issue #8628 has been updated by dimitri-lo2u (Dimitri Geshef). # Could also reproduce the problem with the regexp /,/ # In other words, this will also result in a parse error: p /,/ => 'problematic too' # /in comment/ => 'parse fails in this line' ---------------------------------------- Bug #8628: Parse error with method argument that is a Hash with a specific pattern https://bugs.ruby-lang.org/issues/8628#change-40466 Author: dimitri-lo2u (Dimitri Geshef) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0p195 (2013-05-14) [i386-mingw32] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN # The next two lines cause a parse error p /=/ => 'works' # /in comment/ => 'fails' # The reported error is: # syntax error, unexpected ',', expecting $end # /in comment/ => 'fails' # ^ # The issue is caused by the /=/ regexp in the method p call. # Notice that no parse error occurs when the Hash argument is put between parentheses p(/=/ => 'works'). -- http://bugs.ruby-lang.org/