diff options
Diffstat (limited to 'spec/ruby/library/pathname/new_spec.rb')
-rw-r--r-- | spec/ruby/library/pathname/new_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/pathname/new_spec.rb b/spec/ruby/library/pathname/new_spec.rb index 4f519af398..f400444887 100644 --- a/spec/ruby/library/pathname/new_spec.rb +++ b/spec/ruby/library/pathname/new_spec.rb @@ -7,7 +7,7 @@ describe "Pathname.new" do end it "raises an ArgumentError when called with \0" do - lambda { Pathname.new("\0")}.should raise_error(ArgumentError) + -> { Pathname.new("\0")}.should raise_error(ArgumentError) end it "is tainted if path is tainted" do @@ -16,10 +16,10 @@ describe "Pathname.new" do end it "raises a TypeError if not passed a String type" do - lambda { Pathname.new(nil) }.should raise_error(TypeError) - lambda { Pathname.new(0) }.should raise_error(TypeError) - lambda { Pathname.new(true) }.should raise_error(TypeError) - lambda { Pathname.new(false) }.should raise_error(TypeError) + -> { Pathname.new(nil) }.should raise_error(TypeError) + -> { Pathname.new(0) }.should raise_error(TypeError) + -> { Pathname.new(true) }.should raise_error(TypeError) + -> { Pathname.new(false) }.should raise_error(TypeError) end it "initializes with an object with to_path" do |