ruby-changes:3527
From: ko1@a...
Date: Sun, 13 Jan 2008 15:38:41 +0900 (JST)
Subject: [ruby-changes:3527] nobu - Ruby:r15005 (ruby_1_8): * eval.c (rb_define_alloc_func, rb_undef_alloc_func): should
nobu 2008-01-12 18:27:48 +0900 (Sat, 12 Jan 2008) New Revision: 15005 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/eval.c Log: * eval.c (rb_define_alloc_func, rb_undef_alloc_func): should define/undef on a signleton class. [ruby-core:09959] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15005&r2=15004&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/eval.c?r1=15005&r2=15004&diff_format=u Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 15004) +++ ruby_1_8/ChangeLog (revision 15005) @@ -1,3 +1,10 @@ +Sat Jan 12 18:27:41 2008 Nobuyoshi Nakada <nobu@r...> + + * eval.c (rb_define_alloc_func, rb_undef_alloc_func): should + define/undef on a signleton class. [ruby-core:09959] + +9959] + Sat Jan 12 12:04:14 2008 Tadayoshi Funaba <tadf@d...> * lib/date.rb, lib/date/format.rb: tuning for performance. Index: ruby_1_8/eval.c =================================================================== --- ruby_1_8/eval.c (revision 15004) +++ ruby_1_8/eval.c (revision 15005) @@ -453,7 +453,8 @@ VALUE (*func) _((VALUE)); { Check_Type(klass, T_CLASS); - rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE); + rb_add_method(rb_singleton_class(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), + NOEX_PRIVATE); } void @@ -461,7 +462,7 @@ VALUE klass; { Check_Type(klass, T_CLASS); - rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF); + rb_add_method(rb_singleton_class(klass), ID_ALLOCATOR, 0, NOEX_UNDEF); } static NODE* -- ML: ruby-changes@q... Info: