Revision
787
Author
eloy.de.enige@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

Diff

Modified: MacRuby/trunk/ext/syck/rubyext.c (786 => 787)


--- 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;