Since some time I have used this to prepend something to a string:

  string = 'bc'
  string[0,0] = 'a'

Resulting in:

  'abc'

Then I recently wanted to append something to a string.
Of course there exists the << method already

  string = 'ab'
  string << 'c'

But there does not seem to be a way via []
Using

  string[-1,0] = 'c'

will add at the position before. Is it true that with the
[] method on string one can not append just one character to it?
-- 
Posted via http://www.ruby-forum.com/.