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/time/plus_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/time/plus_spec.rb')
| -rw-r--r-- | spec/ruby/core/time/plus_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/time/plus_spec.rb b/spec/ruby/core/time/plus_spec.rb index 91713b84b3..0a9984f180 100644 --- a/spec/ruby/core/time/plus_spec.rb +++ b/spec/ruby/core/time/plus_spec.rb @@ -17,9 +17,9 @@ describe "Time#+" do end it "raises a TypeError if given argument is a coercible String" do - lambda { Time.now + "1" }.should raise_error(TypeError) - lambda { Time.now + "0.1" }.should raise_error(TypeError) - lambda { Time.now + "1/3" }.should raise_error(TypeError) + -> { Time.now + "1" }.should raise_error(TypeError) + -> { Time.now + "0.1" }.should raise_error(TypeError) + -> { Time.now + "1/3" }.should raise_error(TypeError) end it "increments the time by the specified amount as rational numbers" do @@ -32,8 +32,8 @@ describe "Time#+" do end it "raises TypeError on argument that can't be coerced into Rational" do - lambda { Time.now + Object.new }.should raise_error(TypeError) - lambda { Time.now + "stuff" }.should raise_error(TypeError) + -> { Time.now + Object.new }.should raise_error(TypeError) + -> { Time.now + "stuff" }.should raise_error(TypeError) end it "returns a UTC time if self is UTC" do @@ -74,11 +74,11 @@ describe "Time#+" do end it "raises TypeError on Time argument" do - lambda { Time.now + Time.now }.should raise_error(TypeError) + -> { Time.now + Time.now }.should raise_error(TypeError) end it "raises TypeError on nil argument" do - lambda { Time.now + nil }.should raise_error(TypeError) + -> { Time.now + nil }.should raise_error(TypeError) end #see [ruby-dev:38446] |
