[MacRuby-devel] [MacRuby] #744: map on an array delivered by terminal app via scripting bridge gives an immutable error

MacRuby ruby-noreply at macosforge.org
Wed Jun 9 11:15:29 PDT 2010


#744: map on an array delivered by terminal app via scripting bridge gives an
immutable error
----------------------------+-----------------------------------------------
 Reporter:  jazzbox@…       |       Owner:  lsansonetti@…        
     Type:  defect          |      Status:  new                  
 Priority:  major           |   Milestone:  MacRuby 0.7          
Component:  MacRuby         |    Keywords:                       
----------------------------+-----------------------------------------------
 {{{
 $ cat term.rb

 framework 'ScriptingBridge'

 term = SBApplication.applicationWithBundleIdentifier('com.apple.terminal')

 p term.windows
 p term.windows.class.ancestors
 p [term.windows.first].map { |w| w.name }
 p term.windows.map { |w| w.name }
 }}}

 {{{
 $ macruby term.rb
 [#<TerminalWindow:0x2006a8fe0>]
 [Array, NSMutableArray, NSArray, Enumerable, NSObject, Kernel]
 ["Terminal — macruby"]
 /Users/box/macrubyscripts/term.rb:5:in `<main>': can't modify
 frozen/immutable array (RuntimeError)
 }}}

 MacRuby 0.5 gives no error.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/744>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list