diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-07 13:24:03 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-07 13:24:03 +0000 |
commit | 4ba19c715d75866e152ad0e7226d5c6fa1b1e592 (patch) | |
tree | 2d9d104799329d4730a3b258d3b73fcca27a7468 /thread.c | |
parent | df1e8a6cd09df6acb4c62920ff003aff26ed2078 (diff) | |
download | ruby-4ba19c715d75866e152ad0e7226d5c6fa1b1e592.tar.gz ruby-4ba19c715d75866e152ad0e7226d5c6fa1b1e592.tar.xz ruby-4ba19c715d75866e152ad0e7226d5c6fa1b1e592.zip |
* thread.c (rb_thread_key_p): should always convert symbol to ID.
[ruby-dev:34588]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1557,15 +1557,17 @@ rb_thread_aset(VALUE self, ID id, VALUE val) */ static VALUE -rb_thread_key_p(VALUE self, ID id) +rb_thread_key_p(VALUE self, VALUE key) { rb_thread_t *th; + ID id = rb_to_id(key); + GetThreadPtr(self, th); if (!th->local_storage) { return Qfalse; } - if (st_lookup(th->local_storage, rb_to_id(id), 0)) { + if (st_lookup(th->local_storage, key, 0)) { return Qtrue; } return Qfalse; |