summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel/Complex_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/kernel/Complex_spec.rb')
-rw-r--r--spec/ruby/core/kernel/Complex_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/kernel/Complex_spec.rb b/spec/ruby/core/kernel/Complex_spec.rb
index cb90718759..37f9843931 100644
--- a/spec/ruby/core/kernel/Complex_spec.rb
+++ b/spec/ruby/core/kernel/Complex_spec.rb
@@ -126,16 +126,16 @@ describe "Kernel.Complex()" do
describe "when passed a non-Numeric second argument" do
it "raises TypeError" do
- lambda { Complex(:sym, :sym) }.should raise_error(TypeError)
- lambda { Complex(0, :sym) }.should raise_error(TypeError)
+ -> { Complex(:sym, :sym) }.should raise_error(TypeError)
+ -> { Complex(0, :sym) }.should raise_error(TypeError)
end
end
describe "when passed nil" do
it "raises TypeError" do
- lambda { Complex(nil) }.should raise_error(TypeError, "can't convert nil into Complex")
- lambda { Complex(0, nil) }.should raise_error(TypeError, "can't convert nil into Complex")
- lambda { Complex(nil, 0) }.should raise_error(TypeError, "can't convert nil into Complex")
+ -> { Complex(nil) }.should raise_error(TypeError, "can't convert nil into Complex")
+ -> { Complex(0, nil) }.should raise_error(TypeError, "can't convert nil into Complex")
+ -> { Complex(nil, 0) }.should raise_error(TypeError, "can't convert nil into Complex")
end
end
@@ -155,7 +155,7 @@ describe "Kernel.Complex()" do
describe "and [non-Numeric, Numeric] argument" do
it "throws a TypeError" do
- lambda { Complex(:sym, 0, exception: false) }.should raise_error(TypeError, "not a real")
+ -> { Complex(:sym, 0, exception: false) }.should raise_error(TypeError, "not a real")
end
end