On 28.6.2006, at 18:48, Austin Ziegler wrote:

> There is *no possible good argument* for separating ByteArray from
> String in Ruby. Not with what it would do to the rest of the API, and
> I don't think that anyone who wants a ByteArray is thinking beyond
> String issues.

Oh, really? So it is OK for this code to sometimes receive binary  
String and sometimes String with encoding:
io = SomeIO.open( .... )
v = io.read( 1000 )

This is the most problematic part of String handling. Because if my  
code expects this 'v' to be binary string, v[0..15] is the first 16  
bytes (maybe a message header or something). If this is encoded  
string (because some setting changed outside of my code), v[0..15]  
will be some random amount of data.

This is the error that happens right now and will happen in the  
future also, if the rules are not clear.


izidor