mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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:
parent
d2fa4d7118
commit
7ea675732a
6 changed files with 173 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue