"E.-R. Bruecklmeier" <news01 / eric-bruecklmeier.de> schrieb im Newsbeitrag
news:400559B5.8020908 / eric-bruecklmeier.de...
> Hello
>
> Is there a method similar to Array.delete which returns the modified
> array instead of modifing the array by itself?

irb(main):009:0> a=%w{a b c}
=> ["a", "b", "c"]
irb(main):010:0> a.reject{|s|s>"b"}
=> ["a", "b"]
irb(main):011:0> a
=> ["a", "b", "c"]

> Why aren's there two methods:
>
> Array.delete
>
> and
>
> Array.delete!

Historical reasons, I guess.

Regards

    robert