ruby-changes:4821
From: ko1@a...
Date: Wed, 7 May 2008 22:24:24 +0900 (JST)
Subject: [ruby-changes:4821] matz - Ruby:r16315 (trunk): * thread.c (rb_thread_key_p): should always convert symbol to ID.
matz 2008-05-07 22:24:03 +0900 (Wed, 07 May 2008)
New Revision: 16315
Modified files:
trunk/ChangeLog
trunk/thread.c
Log:
* thread.c (rb_thread_key_p): should always convert symbol to ID.
[ruby-dev:34588]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16315&r2=16314&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=16315&r2=16314&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 16314)
+++ ChangeLog (revision 16315)
@@ -4,6 +4,11 @@
after Init_prelude() because cannot load encoding extensions before
it.
+Wed May 7 19:35:29 2008 Yukihiro Matsumoto <matz@r...>
+
+ * thread.c (rb_thread_key_p): should always convert symbol to ID.
+ [ruby-dev:34588]
+
Wed May 7 19:30:34 2008 Yukihiro Matsumoto <matz@r...>
* numeric.c (fix_divide): float division should floor() before
Index: thread.c
===================================================================
--- thread.c (revision 16314)
+++ thread.c (revision 16315)
@@ -1557,15 +1557,17 @@
*/
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;
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/