[MacRuby] #1384: Additions to class String are unusable from string created with NSString

MacRuby ruby-noreply at macosforge.org
Sun Sep 11 08:23:46 PDT 2011


#1384: Additions to class String are unusable from string created with NSString
--------------------------------+-------------------------------------------
 Reporter:  sohocoke@…          |       Owner:  lsansonetti@…        
     Type:  defect              |      Status:  new                  
 Priority:  minor               |   Milestone:                       
Component:  MacRuby             |    Keywords:                       
--------------------------------+-------------------------------------------

Comment(by watson1978@…):

 I think that object which was created by NSString.stringWithString should
 display "NSString" class. (Similar, #1141)

 {{{
 > str2.class
 => String  # expect => NSString
 }}}

 {{{
 $ macirb --simple
 >> class NSString
 >>   def handy_method
 >>     puts "I'm a handy method."
 >>   end
 >> end
 => nil
 >> str2 = NSString.stringWithString "a"
 => "a"
 >> str2.class
 => String
 >> str2.handy_method
 I'm a handy method.
 => nil
 >>
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1384#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list