diff --git a/ChangeLog b/ChangeLog index ef06f9b7f2..bf04f87e9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 23 10:34:40 2016 Nobuyoshi Nakada + + * 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 * 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