[MacRuby] #407: NSData#bytes does not work
#407: NSData#bytes does not work ---------------------------------+------------------------------------------ Reporter: neeracher@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ MacRuby rev 2903. ---------------- Code ------------ framework 'Cocoa' d = "xy".dataUsingEncoding(NSMacOSRomanStringEncoding) d.bytes --------------------------------- Expected to get some byteptr class, as I did in RubyCocoa. Got an error: Assertion failed: (ValueType->getTypeID() != VoidTyID && "Pointer to void is not valid, use i8* instead!"), function get, file Type.cpp, line 931. -- Ticket URL: <http://www.macruby.org/trac/ticket/407> MacRuby <http://macruby.org/>
#407: NSData#bytes does not work ---------------------------------+------------------------------------------ Reporter: neeracher@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Description changed by neeracher@…: Old description:
MacRuby rev 2903.
---------------- Code ------------ framework 'Cocoa'
d = "xy".dataUsingEncoding(NSMacOSRomanStringEncoding) d.bytes ---------------------------------
Expected to get some byteptr class, as I did in RubyCocoa. Got an error:
Assertion failed: (ValueType->getTypeID() != VoidTyID && "Pointer to void is not valid, use i8* instead!"), function get, file Type.cpp, line 931.
New description: MacRuby rev 2903. ---------------- Code ------------ framework 'Cocoa' d = "xy".dataUsingEncoding(NSMacOSRomanStringEncoding)[[BR]] d.bytes --------------------------------- Expected to get some byteptr class, as I did in RubyCocoa. Got an error: Assertion failed: (ValueType->getTypeID() != VoidTyID && "Pointer to void is not valid, use i8* instead!"), function get, file Type.cpp, line 931. -- -- Ticket URL: <http://www.macruby.org/trac/ticket/407#comment:1> MacRuby <http://macruby.org/>
#407: NSData#bytes does not work ---------------------------------+------------------------------------------ Reporter: neeracher@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.5 Comment: Should be fixed by r2916: {{{ $ ./miniruby -e "framework 'Foundation'; ptr = 'hey'.dataUsingEncoding(NSMacOSRomanStringEncoding).bytes; p ptr[0].chr, ptr[1].chr, ptr[2].chr" "h" "e" "y" }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/407#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby