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

Matthias Neeracher neeracher at apple.com
Thu Oct 29 12:09:49 PDT 2009

> #407: NSData#bytes does not work
> Changes (by lsansonetti@?):

> Comment:
> Should be fixed by r2916:

It is indeed fixed, thank you! My initial purpose for this was to get  
the data out of an NSData, which in RubyCocoa was


It seems the MacRuby "Pointer" class no longer has a bytestr method,  
so this no longer works, but

a) CFDataGetBytePtr(data) works and
b) The original reason for creating a CFData (converting a string to a  
particular encoding) can be achieved much more easily in ruby 1.9 with  
regular string methods, so my reason for creating an NSData is moot in  
the first place.


More information about the MacRuby-devel mailing list