jruby/jruby — pull request #114 by zszugyi (2012-01-25 02:08:27+00:00)
Title: Calls modify() in select_bang to make sure shared memory is not overwrit...

...ten.

This happens in jruby 1.6.5.1 when an array is copied and the copy is modified using select!:

irb(main):007:0> a = [1, 2, 3]
=> [1, 2, 3]
irb(main):008:0> b = Array.new(a)
=> [1, 2, 3]
irb(main):009:0> b.select! &:odd?
=> [1, 3]
irb(main):010:0> a
=> [1, 3, 3]