Permalink
Browse files

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

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4965 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 7582d0e commit e48fb267b0f8414316bbb10430d3b766c72fb268 @Watson1978 Watson1978 committed Dec 2, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 symbol.c
View
1 symbol.c
@@ -766,6 +766,7 @@ Init_Symbol(void)
// 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);

0 comments on commit e48fb26

Please sign in to comment.