Skip to content

Commit

Permalink
Only taint on Ruby <2.7 (#21)
Browse files Browse the repository at this point in the history
Ruby 2.7 deprecates taint and it no longer has an effect.
  • Loading branch information
jeremyevans authored and kou committed Oct 19, 2019
1 parent 2766140 commit 096db0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rexml/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def scan(pattern, cons=false)
end
rv = super
end
rv.taint
rv.taint if RUBY_VERSION < '2.7'
rv
end

Expand Down Expand Up @@ -228,7 +228,7 @@ def match( pattern, cons=false )
@source = nil
end
end
rv.taint
rv.taint if RUBY_VERSION < '2.7'
rv
end

Expand Down

0 comments on commit 096db0f

Please sign in to comment.