[MacRuby] #286: YAML unable to load NSString
#286: YAML unable to load NSString ---------------------------------+------------------------------------------ Reporter: ndnichols@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ If you YAML.dump an immutable NSString (like the kind returned by an NSTextfield's -stringValue), you cannot YAML.load it. It fails with a "bind argument must be an instance of NSMutableString (TypeError)" error. You can YAML.dump a mutableCopy. Attached is an rb_main.rb file that demonstrates this. -- Ticket URL: <http://www.macruby.org/trac/ticket/286> MacRuby <http://macruby.org/>
#286: YAML unable to load NSString ---------------------------------+------------------------------------------ Reporter: ndnichols@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.5 Comment: It appears to work with trunk (at least as of r2945): {{{ $ macruby -r yaml -e "p NSString.stringWithString('hey').class" NSString $ macruby -r yaml -e "p NSString.stringWithString('hey').to_yaml" "--- hey\n" }}} #to_yaml on an immutable string returns a valid YAML description. -- Ticket URL: <http://www.macruby.org/trac/ticket/286#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby