On 12 March 2013 19:25, Love U Ruby <lists / ruby-forum.com> wrote:

> From the book I read a line about string :
>
> "If you try to set part of the string that doesn¡Çt exist¡½***a too-high
> or
> too-low numerical index***, or a string or regular expression that
> doesn¡Çt match the string¡½you get a fatal error."
>
> Could you give one example against the line within ****?
>
> Thanks in advance.
>
> --
> Posted via http://www.ruby-forum.com/.
>

Do you know how to set any part of a string using a numerical index?

For example, if I wrote the following in irb:
>> s = "hello"
=> "hello"

could you set the "e" to "u", so that
>> s == "hullo"  # => true
?

Once you can do that, try it with different numerical indices.