Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Symbol must not respond to #to_i and #to_f

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3850 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit 98864a5501796e957b79ab9e0fa73bb7e086443e 1 parent 31471bb
Laurent Sansonetti authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 symbol.c
View
4 symbol.c
@@ -697,6 +697,10 @@ Init_Symbol(void)
rb_objc_define_method(*(VALUE *)rb_cSymbol, "all_symbols",
rsym_all_symbols, 0);
+ // Undefine methods defined on NSString.
+ rb_undef_method(rb_cSymbol, "to_i");
+ rb_undef_method(rb_cSymbol, "to_f");
+
rb_objc_define_method(rb_cSymbol, "==", rsym_equal, 1);
rb_objc_define_method(rb_cSymbol, "<=>", rsym_cmp, 1);
rb_objc_define_method(rb_cSymbol, "casecmp", rsym_casecmp, 1);
Please sign in to comment.
Something went wrong with that request. Please try again.