Skip to content
Browse files

Calls modify() in select_bang to make sure shared memory is not overw…

…ritten.
  • Loading branch information...
1 parent 1922f2e commit 11cedbaaec15a23d5a56ffd9a93c47a8e62cb8e4 @zszugyi committed Jan 24, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/org/jruby/RubyArray.java
View
4 src/org/jruby/RubyArray.java
@@ -2396,7 +2396,9 @@ public IRubyObject select(ThreadContext context, Block block) {
public IRubyObject select_bang(ThreadContext context, Block block) {
Ruby runtime = context.getRuntime();
if (!block.isGiven()) return enumeratorize(runtime, this, "select!");
-
+
+ modify();
+
int newLength = 0;
IRubyObject[] aux = new IRubyObject[values.length];

0 comments on commit 11cedba

Please sign in to comment.
Something went wrong with that request. Please try again.