Avoid a crash in #define_singleton_method on Floats - Fixes 7693326
--- MacRuby/trunk/class.c 2010-03-17 01:43:05 UTC (rev 3782)
+++ MacRuby/trunk/class.c 2010-03-17 01:59:40 UTC (rev 3783)
@@ -1136,7 +1136,7 @@
{
VALUE klass;
- if (FIXNUM_P(obj) || SYMBOL_P(obj)) {
+ if (FIXNUM_P(obj) || SYMBOL_P(obj) || FIXFLOAT_P(obj)) {
rb_raise(rb_eTypeError, "can't define singleton");
}
if (rb_special_const_p(obj)) {