Project

General

Profile

Bug #8628 ยป snippet.rb

dimitri-lo2u (Dimitri Geshef), 07/12/2013 03:33 PM

 
# Next hash literal is correctly parsed
some_hash = {
/=/ => 'works',
/,/ => 'works'
}

# Next line will fool the Ruby parser
p /=/ => 'works'
# /in comment/ => 'fails'
# Previous (commented!) line result in the error message:
# syntax error, unexpected ',', expecting $end
# /in comment/ => 'fails'
# ^
    (1-1/1)