summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-18 01:30:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-18 01:30:37 +0000
commit676c01bb36d39cf1c0085c4853c9dcbd3b908f35 (patch)
treeae8cb959031fdd737cdac5ae498d43fe9dfa5dba /test
parent849c4eaaf3a03e98ee1f7aefbf58ec152585e4df (diff)
parse.y: fail if yyerror
* parse.y (assignable_gen): fail if yyerror occurred. fix a bug in r36973. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb2
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