Hello,

I think I have found a problem with the Array delete_if method.

If I do the following when a do the arr2 = Array.new arr I get a nil value

>>> arr = ["asd", "qwe", "zxc"]
=> ["asd", "qwe", "zxc"]
>>> arr.delete_if{|x| x == "qwe"}
=> ["asd", "zxc"]
>>> arr2 = Array.new arr
=> [nil, "asd"]

This is happening in 0.9.2 and in 1.0 RC1


Using Ruby I don't get that. What I expected.
irb(main):008:0> arr = ["asd", "qwe", "zxc"]
=> ["asd", "qwe", "zxc"]
irb(main):009:0> arr.delete_if{|x| x =="qwe"}
=> ["asd", "zxc"]
irb(main):010:0> arr2 = Array.new arr
=> ["asd", "zxc"]

Pascal


_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to