diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-23 11:36:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-23 11:36:42 +0000 |
commit | 6a80947a4b7ebb637602ae105ee9b2d20ae62fce (patch) | |
tree | 5f194b8a553f13eb854a66b18b939a9d338e4822 /vm.c | |
parent | b2ea5504bc1c979f786a4ed121f76dd933fff2d0 (diff) | |
download | ruby-6a80947a4b7ebb637602ae105ee9b2d20ae62fce.tar.gz |
* class.c (singleton_class_of): flonum can't have singleton class.
* vm.c (vm_define_method): flonum can't have singleton method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1857,7 +1857,7 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval, } 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)); |