diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-29 09:01:12 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-29 09:01:12 +0000 |
commit | 979ba5fc702823b954f5f3aa12702821d7a6481e (patch) | |
tree | 7a8a857fd9579fc00c5d716207ae92e4fc4c717c /test | |
parent | 6d8ed07d66eb14fc3f35174420b385fb086a7ea0 (diff) |
merge revision(s) 52536: [Backport #11674]
* vm_eval.c (local_var_list_add): skip internal local variable
name by its type but not if it has a name. internal local
variable names are just unique per frame, not globally.
[ruby-core:71437] [Bug #11674]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_variable.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb index 8f5329bb1c..4f371f3bc6 100644 --- a/test/ruby/test_variable.rb +++ b/test/ruby/test_variable.rb @@ -118,4 +118,15 @@ class TestVariable < Test::Unit::TestCase } } end + + def test_local_variables_with_kwarg + bug11674 = '[ruby-core:71437] [Bug #11674]' + v = with_kwargs_11(v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8,v9:9,v10:10,v11:11) + assert_equal(%i(v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11), v, bug11674) + end + + private + def with_kwargs_11(v1:, v2:, v3:, v4:, v5:, v6:, v7:, v8:, v9:, v10:, v11:) + local_variables + end end |