[MacRuby-devel] [MacRuby] #407: NSData#bytes does not work

MacRuby ruby-noreply at macosforge.org
Wed Oct 28 13:51:13 PDT 2009


#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/>



More information about the MacRuby-devel mailing list