Bug #2379: String#[] returns invalid values for short multibyte strings
http://redmine.ruby-lang.org/issues/show/2379

Author: Alexey Froloff
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.1p333 (2009-11-02)

In UTF-8 locale command
ruby -e 'print ""[0,30]' | od -t x1
prints:

0000000 d0 b9 00 00
for ruby 1.9.1p333 (2009-11-02) [i586-linux-gnu]

0000000 d0 b9 00 00 00 00 00 00
for ruby 1.9.1p333 (2009-11-02) [x86_64-linux-gnu]

Minimum "len" to reproduce is 9 for i586 and 17 for x86_64.


----------------------------------------
http://redmine.ruby-lang.org