Skip to content

Commit

Permalink
oops. forgot to infect taintedness
Browse files Browse the repository at this point in the history
  • Loading branch information
tadd committed Nov 24, 2017
1 parent bfc5f67 commit fe3f299
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext/string_undump/string_undump.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ str_undump_roughly(VALUE str)
}
}

OBJ_INFECT(undumped, str);
return undumped;
}

Expand Down
4 changes: 4 additions & 0 deletions test/test_undump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def test_undump_roughly_error
assert_raise(ArgumentError.new('invalid escape')) {'\\'.undump_roughly}
end

def test_undump_taintedness
assert_true(''.taint.undump.tainted?)
end

def test_undump
assert_includes(String.instance_methods, :undump)
end
Expand Down

0 comments on commit fe3f299

Please sign in to comment.