[macruby-changes] [1158] MacRuby/branches/experimental/string.c

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 25 20:21:33 PDT 2009


Revision: 1158
          http://trac.macosforge.org/projects/ruby/changeset/1158
Author:   lsansonetti at apple.com
Date:     2009-03-25 20:21:33 -0700 (Wed, 25 Mar 2009)
Log Message:
-----------
fixed empty symbols

Modified Paths:
--------------
    MacRuby/branches/experimental/string.c

Modified: MacRuby/branches/experimental/string.c
===================================================================
--- MacRuby/branches/experimental/string.c	2009-03-26 03:18:03 UTC (rev 1157)
+++ MacRuby/branches/experimental/string.c	2009-03-26 03:21:33 UTC (rev 1158)
@@ -4926,7 +4926,9 @@
 static VALUE
 sym_inspect(VALUE sym, SEL sel)
 {
-    assert(RSTRING_LEN(sym) > 0);
+    if (RSTRING_LEN(sym) == 0) {
+	return rb_str_new2(":\"\"");
+    }
 
     CFCharacterSetRef letters =
 	CFCharacterSetGetPredefined(kCFCharacterSetLetter);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090325/70e5a52e/attachment.html>


More information about the macruby-changes mailing list