diff options
Diffstat (limited to 'spec/ruby/core/io/pwrite_spec.rb')
-rw-r--r-- | spec/ruby/core/io/pwrite_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/io/pwrite_spec.rb b/spec/ruby/core/io/pwrite_spec.rb index fd3d1b98e9..929ed08698 100644 --- a/spec/ruby/core/io/pwrite_spec.rb +++ b/spec/ruby/core/io/pwrite_spec.rb @@ -31,14 +31,14 @@ ruby_version_is "2.5" do it "raises IOError when file is not open in write mode" do File.open(@fname, "r") do |file| - lambda { file.pwrite("foo", 1) }.should raise_error(IOError) + -> { file.pwrite("foo", 1) }.should raise_error(IOError) end end it "raises IOError when file is closed" do file = File.open(@fname, "w+") file.close - lambda { file.pwrite("foo", 1) }.should raise_error(IOError) + -> { file.pwrite("foo", 1) }.should raise_error(IOError) end end end |