Anthony Ob wrote:
> puts name = 'Prune'

That assigns 'Prune' to name (so name is no longer pointing to an Array, 
it's pointing to a String), then prints the value. It's the same as:

  name = 'Prune'
  puts name

Maybe meant:

  name[4] = 'prune'

or perhaps

  puts name == 'Prune'

(which would have shown 'false' without changing the array)

> puts name[4]

Given that name is a String at this point, that prints character number 
4 (the 5th character). This will print the byte code 101 in Ruby 1.8, 
and the string "e" in ruby 1.9

> # We can add anything!
> name[5] = 4.33

But you can't set the nth character of a string to be a floating point 
value.
-- 
Posted via http://www.ruby-forum.com/.