diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-09 01:16:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-09 01:16:27 +0000 |
commit | 428791543be9e13af9426970f5796f3157dd30a0 (patch) | |
tree | 7f6c4c1af36ec40f480e32414456bb100b322266 /test | |
parent | 1b13e1e6984713db91e616506f1167debbc1e79f (diff) | |
download | ruby-428791543be9e13af9426970f5796f3157dd30a0.tar.gz |
thread.c: get rid of invalid ID symbol
* eval.c (rb_frame_last_func): return the most recent frame method
name.
* thread.c (recursive_list_access): use the last method name,
instead of the current method name which can be unset in some
cases, not to use a symbol by the invalid ID.
[ruby-core:66742] [Bug #10579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_objectspace.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb index 4b8ae74a3c..d519041f0b 100644 --- a/test/ruby/test_objectspace.rb +++ b/test/ruby/test_objectspace.rb @@ -102,4 +102,11 @@ End } End end + + def test_each_object_recursive_key + assert_normal_exit(<<-'end;', '[ruby-core:66742] [Bug #10579]') + h = {["foo"]=>nil} + p Thread.current[:__recursive_key__] + end; + end end |