aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/string/count_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/count_spec.rb')
-rw-r--r--spec/ruby/core/string/count_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/string/count_spec.rb b/spec/ruby/core/string/count_spec.rb
index e82a7c77ca..06ba5a4f0e 100644
--- a/spec/ruby/core/string/count_spec.rb
+++ b/spec/ruby/core/string/count_spec.rb
@@ -23,7 +23,7 @@ describe "String#count" do
end
it "raises an ArgumentError when given no arguments" do
- lambda { "hell yeah".count }.should raise_error(ArgumentError)
+ -> { "hell yeah".count }.should raise_error(ArgumentError)
end
it "negates sets starting with ^" do
@@ -76,8 +76,8 @@ describe "String#count" do
it "raises if the given sequences are invalid" do
s = "hel-[()]-lo012^"
- lambda { s.count("h-e") }.should raise_error(ArgumentError)
- lambda { s.count("^h-e") }.should raise_error(ArgumentError)
+ -> { s.count("h-e") }.should raise_error(ArgumentError)
+ -> { s.count("^h-e") }.should raise_error(ArgumentError)
end
it 'returns the number of occurrences of a multi-byte character' do
@@ -98,8 +98,8 @@ describe "String#count" do
end
it "raises a TypeError when a set arg can't be converted to a string" do
- lambda { "hello world".count(100) }.should raise_error(TypeError)
- lambda { "hello world".count([]) }.should raise_error(TypeError)
- lambda { "hello world".count(mock('x')) }.should raise_error(TypeError)
+ -> { "hello world".count(100) }.should raise_error(TypeError)
+ -> { "hello world".count([]) }.should raise_error(TypeError)
+ -> { "hello world".count(mock('x')) }.should raise_error(TypeError)
end
end