From: Robert Klemme Date: 2004-05-02T01:39:00+09:00 Subject: Re: Strange behaviour of Strings in Range "Michael Neumann" schrieb im Newsbeitrag news:20040501112120.GC794@miya.intranet.ntecs.de... > Hi, > > r1 = ("\000" .. "\377") # all characters? > > r1.to_a > # => ..... "6", "7", "8", "9"] > > r1.to_a.size > # => 58 > > Hm, I guess this is because of "9".succ gives "10", and "10" has a size > of two. > > But why does "9".succ results in "10"? IMHO this is a perlism so you can count with strings irb(main):010:0> ("0".."20").to_a => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"] robert