Projects

Ticket #244 (closed defect: fixed)

Opened 3 years ago

Last modified 23 months ago

String.name should return "String" and not "NSMutableString"

Reported by: carllerche@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.6
Component: MacRuby Keywords:
Cc:

Description

macirb

String.name # => "NSMutableString"

I believe that it is a ruby expectation that core classes will have the same name on any ruby implementation. Extlib and other libraries rely on this fact.

Change History

Changed 3 years ago by mattaimonetti@…

>> "test".is_a?(String)
=> true
>> "test".instance_of?(String)
=> true

Changed 3 years ago by lsansonetti@…

#name and #to_s should probably return "String" when the receiver is NSMutableString (same for Array, Hash and Set) for compatibility purposes. However I would prefer to keep #inspect showing the real class name.

Changed 23 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.6

That should be fixed in trunk as of r3858.

Note: See TracTickets for help on using tickets.