From: "nobu (Nobuyoshi Nakada)" Date: 2013-07-12T16:18:50+09:00 Subject: [ruby-core:55973] [ruby-trunk - Bug #8628][Rejected] Parse error with method argument that is a Hash with a specific pattern Issue #8628 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Rejected `p /=/' is interpreted as `p /= /.../', an assignment to a variable `p'. ---------------------------------------- Bug #8628: Parse error with method argument that is a Hash with a specific pattern https://bugs.ruby-lang.org/issues/8628#change-40468 Author: dimitri-lo2u (Dimitri Geshef) Status: Rejected 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/