Slice! breakge?

Hi,

I am testing the current cvs ruby

The following code

a = "a"
a.slice!(/b/)

raise IndexError whileas ruby-1.6 does not.

Is it a bug or intended ?

Thanks

-Ted

Is it a bug or intended ?

Intended : [ruby-talk:41573]

Guy Decoux

Hi,

···

In message “Re: slice! breakge?” on 02/07/11, ts decoux@moulon.inra.fr writes:

Is it a bug or intended ?

Intended : [ruby-talk:41573]

But Ted made me re-think. slice and slice! should work consistently,
so that slice! will return nil without exception when slice with same
arguments returns nil. Sorry for frequent changes.

						matz.