[MacRuby] #1269: String() should coerce NSStrings
MacRuby
ruby-noreply at macosforge.org
Fri May 6 11:10:32 PDT 2011
#1269: String() should coerce NSStrings
---------------------------------------+------------------------------------
Reporter: joshua.ballanco@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
---------------------------------------+------------------------------------
This is kinda unexpected:
{{{
class String
def foo
"bar"
end
end
s = NSString.alloc.initWithString("Test")
String(s).foo
# => NoMethodError: undefined method `foo' for "Test":String
}}}
Using String.new() get's you the expected result, but I would think that
String() should as well...
--
Ticket URL: <http://www.macruby.org/trac/ticket/1269>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list