Skip to content

Commit

Permalink
5665 fix - check for tainted and pass it along
Browse files Browse the repository at this point in the history
Signed-off-by: Hiro Asari <asari.ruby@gmail.com>
  • Loading branch information
browning authored and BanzaiMan committed May 19, 2011
1 parent 1bfff67 commit 929f5d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
Expand Up @@ -4632,7 +4632,12 @@ public IRubyObject scan(ThreadContext context, IRubyObject arg, Block block) {
tuFlags = regex.flags;
} else {
pattern = getStringPattern(runtime, enc, arg);
tuFlags = 0;
if (arg.isTaint()) {
tuFlags = RubyBasicObject.TAINTED_F;
}
else {
tuFlags = 0;
}
}

int begin = value.getBegin();
Expand Down

0 comments on commit 929f5d9

Please sign in to comment.