diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/file/extname_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
download | ruby-5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0.tar.gz |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/file/extname_spec.rb')
-rw-r--r-- | spec/ruby/core/file/extname_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/file/extname_spec.rb b/spec/ruby/core/file/extname_spec.rb index 7632b6adc0..358690b44a 100644 --- a/spec/ruby/core/file/extname_spec.rb +++ b/spec/ruby/core/file/extname_spec.rb @@ -33,15 +33,15 @@ describe "File.extname" do end it "raises a TypeError if not passed a String type" do - lambda { File.extname(nil) }.should raise_error(TypeError) - lambda { File.extname(0) }.should raise_error(TypeError) - lambda { File.extname(true) }.should raise_error(TypeError) - lambda { File.extname(false) }.should raise_error(TypeError) + -> { File.extname(nil) }.should raise_error(TypeError) + -> { File.extname(0) }.should raise_error(TypeError) + -> { File.extname(true) }.should raise_error(TypeError) + -> { File.extname(false) }.should raise_error(TypeError) end it "raises an ArgumentError if not passed one argument" do - lambda { File.extname }.should raise_error(ArgumentError) - lambda { File.extname("foo.bar", "foo.baz") }.should raise_error(ArgumentError) + -> { File.extname }.should raise_error(ArgumentError) + -> { File.extname("foo.bar", "foo.baz") }.should raise_error(ArgumentError) end |