Skip to content

Commit

Permalink
[Truffle] string_scrub can no longer return nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jan 10, 2017
1 parent 8e54fc1 commit e4e8e11
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions truffle/src/main/ruby/core/string.rb
Expand Up @@ -1222,12 +1222,8 @@ def scrub(replace = nil, &block)
end

val = Truffle.invoke_primitive(:string_scrub, self, nil, replace_block)
if val.nil?
dup
else
val.taint if taint
val
end
val.taint if taint
val
end

def scrub!(replace = nil, &block)
Expand Down

0 comments on commit e4e8e11

Please sign in to comment.