ruby-changes:24752
From: usa <ko1@a...>
Date: Thu, 23 Aug 2012 20:36:53 +0900 (JST)
Subject: [ruby-changes:24752] usa:r36803 (trunk): * class.c (singleton_class_of): flonum can't have singleton class.
usa 2012-08-23 20:36:42 +0900 (Thu, 23 Aug 2012) New Revision: 36803 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36803 Log: * class.c (singleton_class_of): flonum can't have singleton class. * vm.c (vm_define_method): flonum can't have singleton method. Modified files: trunk/ChangeLog trunk/class.c trunk/vm.c Index: ChangeLog =================================================================== --- ChangeLog (revision 36802) +++ ChangeLog (revision 36803) @@ -1,3 +1,9 @@ +Thu Aug 23 20:34:32 2012 NAKAMURA Usaku <usa@r...> + + * class.c (singleton_class_of): flonum can't have singleton class. + + * vm.c (vm_define_method): flonum can't have singleton method. + Thu Aug 23 19:18:33 2012 NAKAMURA Usaku <usa@r...> * common.mk (win32/*): macro RUBY_H_INCLUDES is not defined there, Index: class.c =================================================================== --- class.c (revision 36802) +++ class.c (revision 36803) @@ -1315,7 +1315,7 @@ { VALUE klass; - if (FIXNUM_P(obj) || SYMBOL_P(obj)) { + if (FIXNUM_P(obj) || FLONUM_P(obj) || SYMBOL_P(obj)) { rb_raise(rb_eTypeError, "can't define singleton"); } if (SPECIAL_CONST_P(obj)) { Index: vm.c =================================================================== --- vm.c (revision 36802) +++ vm.c (revision 36803) @@ -1857,7 +1857,7 @@ } if (is_singleton) { - if (FIXNUM_P(obj) || SYMBOL_P(obj)) { + if (FIXNUM_P(obj) || FLONUM_P(obj) || SYMBOL_P(obj)) { rb_raise(rb_eTypeError, "can't define singleton method \"%s\" for %s", rb_id2name(id), rb_obj_classname(obj)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/