aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/complex/coerce_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/complex/coerce_spec.rb')
-rw-r--r--spec/ruby/core/complex/coerce_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/complex/coerce_spec.rb b/spec/ruby/core/complex/coerce_spec.rb
index ce2fb36b73..a30a6c1d5f 100644
--- a/spec/ruby/core/complex/coerce_spec.rb
+++ b/spec/ruby/core/complex/coerce_spec.rb
@@ -53,18 +53,18 @@ describe "Complex#coerce" do
it "raises TypeError when other is a Numeric which responds to #real? with false" do
other = mock_numeric('other')
other.should_receive(:real?).any_number_of_times.and_return(false)
- lambda { @one.coerce(other) }.should raise_error(TypeError)
+ -> { @one.coerce(other) }.should raise_error(TypeError)
end
it "raises a TypeError when other is a String" do
- lambda { @one.coerce("20") }.should raise_error(TypeError)
+ -> { @one.coerce("20") }.should raise_error(TypeError)
end
it "raises a TypeError when other is nil" do
- lambda { @one.coerce(nil) }.should raise_error(TypeError)
+ -> { @one.coerce(nil) }.should raise_error(TypeError)
end
it "raises a TypeError when other is false" do
- lambda { @one.coerce(false) }.should raise_error(TypeError)
+ -> { @one.coerce(false) }.should raise_error(TypeError)
end
end