diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 8b89f95dc4..49522c42cd 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -187,8 +187,10 @@ class TestSyntax < Test::Unit::TestCase end def test_unassignable + gvar = global_variables %w[self nil true false __FILE__ __LINE__ __ENCODING__].each do |kwd| assert_raise(SyntaxError) {eval("#{kwd} = nil")} + assert_equal(gvar, global_variables) end end |