diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-23 01:34:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-23 01:34:42 +0000 |
commit | c58c90257624c6065e1201f54790e246a823d4d6 (patch) | |
tree | b1af090d1a73912f175c70b25f1f64994a6e07ad | |
parent | c2bf7e6f7d2fbe0b50da59aaa1374222f233aa71 (diff) | |
download | ruby-c58c90257624c6065e1201f54790e246a823d4d6.tar.gz |
test_psych.rb: close Tempfile
* test/psych/test_psych.rb (test_load_file_with_fallback): fix
Tempfile leak. https://github.com/tenderlove/psych/pull/288
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/psych/test_psych.rb | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Tue Aug 23 10:34:40 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * test/psych/test_psych.rb (test_load_file_with_fallback): fix + Tempfile leak. https://github.com/tenderlove/psych/pull/288 + Tue Aug 23 10:15:01 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (rb_fs_setter): check and convert $; value at diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 508519b012..0e769274fd 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -145,8 +145,9 @@ class TestPsych < Psych::TestCase end def test_load_file_with_fallback - t = Tempfile.create(['empty', 'yml']) - assert_equal Hash.new, Psych.load_file(t.path, Hash.new) + Tempfile.create(['empty', 'yml']) {|t| + assert_equal Hash.new, Psych.load_file(t.path, Hash.new) + } end def test_parse_file |