Revision: 3783 http://trac.macosforge.org/projects/ruby/changeset/3783 Author: martinlagardette@apple.com Date: 2010-03-16 18:59:40 -0700 (Tue, 16 Mar 2010) Log Message: ----------- Avoid a crash in #define_singleton_method on Floats - Fixes 7693326 Modified Paths: -------------- MacRuby/trunk/class.c Modified: MacRuby/trunk/class.c =================================================================== --- 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)) {
participants (1)
-
source_changes@macosforge.org