diff options
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 |