summaryrefslogtreecommitdiff
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-08-24 00:37:24 +0900
committergit <[email protected]>2024-08-26 02:49:02 +0000
commit136cbf04419acf993357701e54712f921a294355 (patch)
tree7d6526aa2653bb8ee315156b60d728d22cfbbd24 /test/test_tempfile.rb
parent2e07c13049a887c22849e77648838f040b0759b0 (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.rb12
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