diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-20 01:23:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-20 01:23:02 +0000 |
commit | 7190c04417a52c29d1dcf6b2f04bb55b30cbfd9f (patch) | |
tree | 3b2ddfd7c895c702f13b175494c67b978be7ae58 /test/ruby | |
parent | 341376215b58407d6764240d9b9ebe67a9c82170 (diff) | |
download | ruby-7190c04417a52c29d1dcf6b2f04bb55b30cbfd9f.tar.gz |
compile.c: store IDs as Symbols
* compile.c (iseq_set_arguments): store local variable IDs in
temporary list as Symbols. previously these are stored as
Fixnums to prevent from GC, but IDs of dynamic symbols can
exceed Fixnum range and cause RangeError at inverting from
Fixnum. [ruby-dev:48564] [Bug #10266]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_keyword.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index a7249381d8..6080c02bf5 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -491,4 +491,13 @@ class TestKeywordArguments < Test::Unit::TestCase tap { prc.call } }, bug8964 end + + def test_dynamic_symbol_keyword + bug10266 = '[ruby-dev:48564] [Bug #10266]' + assert_separately(['-', bug10266], <<-'end;') # do + bug = ARGV.shift + "hoge".to_sym + assert_nothing_raised(bug) {eval("def a(hoge:); end")} + end; + end end |