scoped constant op-assignment

* node.h (NODE_OP_CDECL), compile.c (iseq_compile_each),
  parse.y (stmt, arg): allow scoped constant op-assignment.
  [ruby-core:40154] [Bug #5449]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-12-24 15:59:31 +00:00
parent d2fa4d7118
commit 7ea675732a
6 changed files with 173 additions and 10 deletions

View file

@ -173,10 +173,12 @@ class TestParse < Test::Unit::TestCase
end
c = Class.new
assert_raise(SyntaxError) do
assert_nothing_raised(SyntaxError) do
eval <<-END, nil, __FILE__, __LINE__+1
if false
c::FOO &= 1
::FOO &= 1
end
END
end