[macruby-changes] [787] MacRuby/trunk/ext/syck/rubyext.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Jan 13 06:26:29 PST 2009


Revision: 787
          http://trac.macosforge.org/projects/ruby/changeset/787
Author:   eloy.de.enige at gmail.com
Date:     2009-01-13 06:26:28 -0800 (Tue, 13 Jan 2009)
Log Message:
-----------
Updated the error that's raised when a unknown class is found in YAML to be a NameError instead of TypeError.

Modified Paths:
--------------
    MacRuby/trunk/ext/syck/rubyext.c

Modified: MacRuby/trunk/ext/syck/rubyext.c
===================================================================
--- MacRuby/trunk/ext/syck/rubyext.c	2009-01-13 14:14:02 UTC (rev 786)
+++ MacRuby/trunk/ext/syck/rubyext.c	2009-01-13 14:26:28 UTC (rev 787)
@@ -1109,9 +1109,7 @@
                         }
                         else /* workaround for SEGV. real fix please */
                         {
-                            VALUE msg = rb_str_new2( "invalid subclass: " );
-                            rb_str_append( msg, subclass );
-                            rb_raise( rb_eTypeError, RSTRING_PTR(msg) );
+                            rb_raise( rb_eNameError, "uninitialized constant %s found while instantiating classes from YAML", RSTRING_PTR( subclass ) );
                         }
                     }
                     break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090113/308df9d6/attachment.html>


More information about the macruby-changes mailing list