Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Strange behaviour of Strings in Range"
>     on 04/05/01, Michael Neumann <mneumann / ntecs.de> writes:
> 
> |  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"?
> 
> It's caused by "succ" magic.  Let me think about either subtracting
> magic, or adding more magic.

"9" is not really a character anyway, but a string consisting of
one character.

In current Ruby, 0..0377 would work, since a character is essentially
a Fixnum.

Will Rite have a better-defined notion of "character"? Perhaps including
Unicode and such?


Hal