aboutsummaryrefslogtreecommitdiffstats
path: root/test/-ext-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-29 02:18:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-29 02:18:20 +0000
commit401c8bb00be23a6485a068add70e01419673a91e (patch)
tree695e66395b494972a653d54dfbfbc29903fbc110 /test/-ext-
parent7fd45e90cb165ae1274f8bdd10c76ef8cfab580b (diff)
downloadruby-401c8bb00be23a6485a068add70e01419673a91e.tar.gz
thread.c: fix dynamic symbol keys
* thread.c (rb_thread_variable_get): fix dynamic symbol keys. rb_check_id() returns non-zero only for static symbols, whereas thread local variable keys can be dynamic symbols. [ruby-core:67185] [Bug #10667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index abcb5d9ccb..b180d08b04 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -202,7 +202,13 @@ module Test_Symbol
Thread.current.thread_variable_set(:test, nil)
name = noninterned_name
assert_nil(Thread.current.thread_variable_get(name))
- assert_not_interned(name)
+ assert_not_pinneddown(name)
+ end
+
+ def test_thread_variable_set
+ name = noninterned_name
+ Thread.current.thread_variable_set(name, 42)
+ assert_not_pinneddown(name)
end
def test_thread_variable?