From: David Vallner Date: 2006-10-19T08:47:25+09:00 Subject: Re: Bitwise operations --------------enig2C0250A0F26834FC0DCF1A35 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gavin Kistner wrote: > Strings in Ruby are, as you say, series of 8-bit bytes. The String#[] > operator when called with a single integer index returns the numeric > value of the requested byte: >=20 Reputedly about to change in Ruby 2, indexing a String will return a single-character string. I think there'll be some more clean separation between methods operating on a String as a (possibly Unicode) text string or as binary data. I'm still personally not quite happy with the semantics of Strings being overloaded like this, but it's probably the most compatible way. David Vallner --------------enig2C0250A0F26834FC0DCF1A35 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFNr0Iy6MhrS8astoRArn3AJ9blvndZQu99HzUU8uE6lzFa6csnQCeK4Ha yNrE6EO0QkpayJzyZwOFzlY= =9GsQ -----END PGP SIGNATURE----- --------------enig2C0250A0F26834FC0DCF1A35--