aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/integer/to_s_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/to_s_spec.rb')
-rw-r--r--spec/ruby/core/integer/to_s_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/integer/to_s_spec.rb b/spec/ruby/core/integer/to_s_spec.rb
index 687dc9d18f..7988bfde7a 100644
--- a/spec/ruby/core/integer/to_s_spec.rb
+++ b/spec/ruby/core/integer/to_s_spec.rb
@@ -13,10 +13,10 @@ describe "Integer#to_s" do
end
it "raises an ArgumentError if the base is less than 2 or higher than 36" do
- lambda { 123.to_s(-1) }.should raise_error(ArgumentError)
- lambda { 123.to_s(0) }.should raise_error(ArgumentError)
- lambda { 123.to_s(1) }.should raise_error(ArgumentError)
- lambda { 123.to_s(37) }.should raise_error(ArgumentError)
+ -> { 123.to_s(-1) }.should raise_error(ArgumentError)
+ -> { 123.to_s(0) }.should raise_error(ArgumentError)
+ -> { 123.to_s(1) }.should raise_error(ArgumentError)
+ -> { 123.to_s(37) }.should raise_error(ArgumentError)
end
end
@@ -59,10 +59,10 @@ describe "Integer#to_s" do
end
it "raises an ArgumentError if the base is less than 2 or higher than 36" do
- lambda { 123.to_s(-1) }.should raise_error(ArgumentError)
- lambda { 123.to_s(0) }.should raise_error(ArgumentError)
- lambda { 123.to_s(1) }.should raise_error(ArgumentError)
- lambda { 123.to_s(37) }.should raise_error(ArgumentError)
+ -> { 123.to_s(-1) }.should raise_error(ArgumentError)
+ -> { 123.to_s(0) }.should raise_error(ArgumentError)
+ -> { 123.to_s(1) }.should raise_error(ArgumentError)
+ -> { 123.to_s(37) }.should raise_error(ArgumentError)
end
end