[Ironruby-core] Bytes or Characters?

Charles Oliver Nutter charles.nutter at sun.com
Thu Aug 7 18:17:37 EDT 2008

Hey, I'm curious how IronRuby is handling the bytes versus characters 
issue for Ruby strings. JRuby currently only has byte[]-based strings, a 
decision we made mostly for Ruby performance. But it has obvious 
implications for calling Java code, since we need to decode and encode 
the byte[] to char[] on the way in and out. Ultimately the decision to 
use byte[]-based strings was the right one, since so much of Ruby 
expects byte counts and uses String as a generic byte bucket. But more 
and more we've started to consider ways to hybridize String so it's 
characters when we want it to be and bytes otherwise.

So, what does IronRuby do?

- Charlie

More information about the Ironruby-core mailing list