[macruby-changes] [4965] MacRuby/trunk/symbol.c

source_changes at macosforge.org source_changes at macosforge.org
Wed Dec 1 23:18:43 PST 2010


Revision: 4965
          http://trac.macosforge.org/projects/ruby/changeset/4965
Author:   watson1978 at gmail.com
Date:     2010-12-01 23:18:40 -0800 (Wed, 01 Dec 2010)
Log Message:
-----------
will not have the Symbol#to_str.

Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions

assert_equal("ok", :ok.to_s)
assert_raise(NoMethodError) { :ok.to_str }

puts :ok
}}}

Modified Paths:
--------------
    MacRuby/trunk/symbol.c

Modified: MacRuby/trunk/symbol.c
===================================================================
--- MacRuby/trunk/symbol.c	2010-12-01 23:47:25 UTC (rev 4964)
+++ MacRuby/trunk/symbol.c	2010-12-02 07:18:40 UTC (rev 4965)
@@ -766,6 +766,7 @@
     // Undefine methods defined on NSString.
     rb_undef_method(rb_cSymbol, "to_i");
     rb_undef_method(rb_cSymbol, "to_f");
+    rb_undef_method(rb_cSymbol, "to_str");
 
     rb_objc_define_method(rb_cSymbol, "==", rsym_equal, 1);
     rb_objc_define_method(rb_cSymbol, "<=>", rsym_cmp, 1);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101201/ee58694f/attachment.html>


More information about the macruby-changes mailing list