Issue #4136 has been updated by Charles Nutter.


I find this behavior unintuitive. #reject returns a *new* array, which I would not expect to have instance variables from the old array. It could, in fact, drag along data I don't intend for it to drag along, with no obvious way to scrub that data out other than manually *removing* instance vars on the new object.

Also note that this unnecessarily impacts the perf of reject when ivars are present, and if people want this behavior, .dup.reject! is an easy way to get it.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4136

----------------------------------------
http://redmine.ruby-lang.org