>>>>> "M" == Mathieu Bouchard <matju / sympatico.ca> writes:

M> 1. Is there an error in the doc of Array#slice! ?
 
 yes,

M> 2. What is that error ?

  a = [1, 2]
  a.slice!(-4 .. -1)

 And if you look at the test of BDB you'll see

      10.times do |iter|
         i = rand($bdb.size)
         j = i + rand($bdb.size - i)
         if ! $array.slice(i .. j)
            assert_error(RangeError, '', "<invalid range>") { $bdb.slice!(i .. j
) }
            another += 1
            redo if another < 10
            another = 0
            next
         end
         assert_equal($bdb.slice!(i .. j), $array.slice!(i .. j), "<slice!(#{i} 
.. #{j})>")
         assert_equal($bdb.size, $array.size, "<size after slice! #{iter}>")
         another = 0
         reinject(20) if $bdb.size < 20
      end

M> Well, I don't want to force you to change your mind...

 There is a french expression for this "vous jouez avec le feu", only *one*
 person can design such a test because only *one* person know ruby.


Guy Decoux