summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringscanner/scan_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringscanner/scan_spec.rb')
-rw-r--r--spec/ruby/library/stringscanner/scan_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/stringscanner/scan_spec.rb b/spec/ruby/library/stringscanner/scan_spec.rb
index 8e26b80591..8b9960e6e6 100644
--- a/spec/ruby/library/stringscanner/scan_spec.rb
+++ b/spec/ruby/library/stringscanner/scan_spec.rb
@@ -51,9 +51,9 @@ describe "StringScanner#scan" do
end
it "raises a TypeError if pattern isn't a Regexp" do
- lambda { @s.scan("aoeu") }.should raise_error(TypeError)
- lambda { @s.scan(5) }.should raise_error(TypeError)
- lambda { @s.scan(:test) }.should raise_error(TypeError)
- lambda { @s.scan(mock('x')) }.should raise_error(TypeError)
+ -> { @s.scan("aoeu") }.should raise_error(TypeError)
+ -> { @s.scan(5) }.should raise_error(TypeError)
+ -> { @s.scan(:test) }.should raise_error(TypeError)
+ -> { @s.scan(mock('x')) }.should raise_error(TypeError)
end
end