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

source_changes at macosforge.org source_changes at macosforge.org
Thu Jun 4 14:35:42 PDT 2009


Revision: 1724
          http://trac.macosforge.org/projects/ruby/changeset/1724
Author:   lsansonetti at apple.com
Date:     2009-06-04 14:35:41 -0700 (Thu, 04 Jun 2009)
Log Message:
-----------
Symbol#to_str should not exist

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

Modified: MacRuby/branches/experimental/string.c
===================================================================
--- MacRuby/branches/experimental/string.c	2009-06-04 21:35:00 UTC (rev 1723)
+++ MacRuby/branches/experimental/string.c	2009-06-04 21:35:41 UTC (rev 1724)
@@ -5308,7 +5308,8 @@
 static VALUE
 rb_bytestring_alloc(VALUE klass, SEL sel)
 {
-    VALUE bstr = (VALUE)class_createInstance((Class)rb_cByteString, sizeof(void *));
+    VALUE bstr = (VALUE)class_createInstance((Class)rb_cByteString,
+	    sizeof(void *));
 
     CFMutableDataRef data = CFDataCreateMutable(NULL, 0);
     rb_bytestring_set_wrapped_data(bstr, data);
@@ -5608,7 +5609,9 @@
     rb_objc_define_method(rb_cSymbol, "id2name", rb_sym_to_s_imp, 0);
     rb_objc_define_method(rb_cSymbol, "intern", sym_to_sym, 0);
     rb_objc_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
-    
+ 
+    rb_undef_method(rb_cSymbol, "to_str");
+
     install_symbol_primitives();
 
     rb_cByteString = (VALUE)objc_allocateClassPair((Class)rb_cNSMutableString,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090604/ec5fbbce/attachment.html>


More information about the macruby-changes mailing list