diff options
Diffstat (limited to 'test/psych/test_tainted.rb')
-rw-r--r-- | test/psych/test_tainted.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/psych/test_tainted.rb b/test/psych/test_tainted.rb index 62872b0..37fc5b2 100644 --- a/test/psych/test_tainted.rb +++ b/test/psych/test_tainted.rb @@ -117,14 +117,14 @@ module Psych class TestIOTainted < TestStringTainted def assert_taintedness string - t = Tempfile.new(['something', 'yml']) - t.binmode - t.write string - t.close - File.open(t.path, 'r:bom|utf-8') { |f| - @parser.parse f + Tempfile.create(['something', 'yml']) {|t| + t.binmode + t.write string + t.close + File.open(t.path, 'r:bom|utf-8') { |f| + @parser.parse f + } } - t.close(true) end end end |