[macruby-changes] [3783] MacRuby/trunk/class.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 16 18:59:40 PDT 2010


Revision: 3783
          http://trac.macosforge.org/projects/ruby/changeset/3783
Author:   martinlagardette at 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)) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100316/3f87c032/attachment.html>


More information about the macruby-changes mailing list