#714: Hide certain methods on Symbol which are inherited from NSString. -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@… | Owner: eloy.de.enige@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by mike@…): Replying to [ticket:714 eloy.de.enige@…]:
An example is #include? but there might be others.
IRB session in 1.9.1: {{{ irb: "string".methods - :symbol.methods ===> [:+, :*, :%, :[]=, :insert, :bytesize, :succ!, :next!, :upto, :index, :rindex, :replace, :clear, :chr, :getbyte, :setbyte, :to_i, :to_f, :to_str, :dump, :upcase!, :downcase!, :capitalize!, :swapcase!, :hex, :oct, :split, :lines, :bytes, :chars, :codepoints, :reverse, :reverse!, :concat, :<<, :crypt, :ord, :include?, :start_with?, :end_with?, :scan, :ljust, :rjust, :center, :sub, :gsub, :chop, :chomp, :strip, :lstrip, :rstrip, :sub!, :gsub!, :chop!, :chomp!, :strip!, :lstrip!, :rstrip!, :tr, :tr_s, :delete, :squeeze, :count, :tr!, :tr_s!, :delete!, :squeeze!, :each_line, :each_byte, :each_char, :each_codepoint, :sum, :slice!, :partition, :rpartition, :force_encoding, :valid_encoding?, :ascii_only?, :unpack, :encode, :encode!, :to_r, :to_c] }}} IRB session in MacRuby 0.5: {{{ irb: "string".methods - :symbol.methods ===> [] }}} I haven't been able to get llvm working on my machine, so I don't have a patch, but I suspect a fix would be to undefined the string methods above here: [http://github.com/MacRuby/MacRuby/blob/trunk/symbol.c#L766] -- Ticket URL: <http://www.macruby.org/trac/ticket/714#comment:1> MacRuby <http://macruby.org/>