summaryrefslogtreecommitdiff
path: root/spec/ruby/core/math/log2_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/math/log2_spec.rb')
-rw-r--r--spec/ruby/core/math/log2_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/math/log2_spec.rb b/spec/ruby/core/math/log2_spec.rb
index 8a7c582f92..1594f2d7af 100644
--- a/spec/ruby/core/math/log2_spec.rb
+++ b/spec/ruby/core/math/log2_spec.rb
@@ -16,15 +16,15 @@ describe "Math.log2" do
end
it "raises an Errno::EDOM if the argument is less than 0" do
- lambda { Math.log2(-1e-15) }.should raise_error( Math::DomainError)
+ -> { Math.log2(-1e-15) }.should raise_error( Math::DomainError)
end
it "raises a TypeError if the argument cannot be coerced with Float()" do
- lambda { Math.log2("test") }.should raise_error(TypeError)
+ -> { Math.log2("test") }.should raise_error(TypeError)
end
it "raises a TypeError if passed a numerical argument as a string" do
- lambda { Math.log2("1.0") }.should raise_error(TypeError)
+ -> { Math.log2("1.0") }.should raise_error(TypeError)
end
it "returns NaN given NaN" do
@@ -32,7 +32,7 @@ describe "Math.log2" do
end
it "raises a TypeError if the argument is nil" do
- lambda { Math.log2(nil) }.should raise_error(TypeError)
+ -> { Math.log2(nil) }.should raise_error(TypeError)
end
it "accepts any argument that can be coerced with Float()" do