diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-08-24 00:37:24 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-08-26 02:49:02 +0000 |
commit | 136cbf04419acf993357701e54712f921a294355 (patch) | |
tree | 7d6526aa2653bb8ee315156b60d728d22cfbbd24 /test/test_tempfile.rb | |
parent | 2e07c13049a887c22849e77648838f040b0759b0 (diff) |
[ruby/tempfile] Support anonymous tempfile on earlier than Ruby 3.2
https://github.com/ruby/tempfile/commit/7052805029
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r-- | test/test_tempfile.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index 931b512ee0..8077cc3603 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -488,11 +488,7 @@ puts Tempfile.new('foo').path Dir.mktmpdir {|d| t = Tempfile.create("", d, anonymous: true) t.close - if RUBY_VERSION >= '3.2' - assert_equal([], Dir.children(d)) - else - refute_equal([], Dir.children(d)) - end + assert_equal([], Dir.children(d)) } end @@ -500,11 +496,7 @@ puts Tempfile.new('foo').path Dir.mktmpdir {|d| begin t = Tempfile.create("", d, anonymous: true) - if RUBY_VERSION >= '3.2' - assert_equal(File.join(d, ""), t.path) - else - refute_equal(File.join(d, ""), t.path) - end + assert_equal(File.join(d, ""), t.path) ensure t.close if t end |