summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/shared
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-08 19:43:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-01 15:36:20 +0900
commit826f44834fe11f3f9c52343443a15b6c83466889 (patch)
treef2c2abed62db1c750515cd8b0fbac6442b6d4200 /spec/ruby/core/file/shared
parent3a2073e61b6ccce6d07d31ebd89d4c385b9a55f2 (diff)
Drop support for ruby 2.4 from ruby/spec
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2892
Diffstat (limited to 'spec/ruby/core/file/shared')
-rw-r--r--spec/ruby/core/file/shared/path.rb32
1 files changed, 15 insertions, 17 deletions
diff --git a/spec/ruby/core/file/shared/path.rb b/spec/ruby/core/file/shared/path.rb
index cfd119f799..d964acc855 100644
--- a/spec/ruby/core/file/shared/path.rb
+++ b/spec/ruby/core/file/shared/path.rb
@@ -50,26 +50,24 @@ describe :file_path, shared: true do
@file.send(@method).encoding.should == Encoding.find("euc-jp")
end
- ruby_version_is "2.5" do
- platform_is :linux do
- guard -> { defined?(File::TMPFILE) } do
- before :each do
- @dir = tmp("tmpfilespec")
- mkdir_p @dir
- end
+ platform_is :linux do
+ guard -> { defined?(File::TMPFILE) } do
+ before :each do
+ @dir = tmp("tmpfilespec")
+ mkdir_p @dir
+ end
- after :each do
- rm_r @dir
- end
+ after :each do
+ rm_r @dir
+ end
- it "raises IOError if file was opened with File::TMPFILE" do
- begin
- File.open(@dir, File::RDWR | File::TMPFILE) do |f|
- -> { f.send(@method) }.should raise_error(IOError)
- end
- rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR
- skip "no support from the filesystem"
+ it "raises IOError if file was opened with File::TMPFILE" do
+ begin
+ File.open(@dir, File::RDWR | File::TMPFILE) do |f|
+ -> { f.send(@method) }.should raise_error(IOError)
end
+ rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR
+ skip "no support from the filesystem"
end
end
end