[MacRuby-devel] [MacRuby] #601: hashes with empty values cannot writeToFile

MacRuby ruby-noreply at macosforge.org
Thu Feb 4 00:02:29 PST 2010


#601: hashes with empty values cannot writeToFile
--------------------------------+-------------------------------------------
 Reporter:  lastobelus@…        |       Owner:  lsansonetti@…        
     Type:  defect              |      Status:  new                  
 Priority:  major               |   Milestone:                       
Component:  MacRuby             |    Keywords:                       
--------------------------------+-------------------------------------------
 In objective c, empty values in nsdictionaries are handled by using the
 NSNull placeholder. Macruby replaces this with ruby nil on the ruby side.
 But when the writeToFile method is used on macruby hashes with such empty
 values, it fails.


 == code: ==

 {{{
  b={:k => NSNull.new}
  b.writeToFile("/tmp/bob", atomically:true)
 }}}

 == expected result ==
 true, and a plist should be written to /tmp/bob

 == actual result ==
 0, and no file written

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



More information about the MacRuby-devel mailing list