summaryrefslogtreecommitdiff
path: root/spec/ruby/core/regexp/timeout_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/regexp/timeout_spec.rb')
-rw-r--r--spec/ruby/core/regexp/timeout_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/regexp/timeout_spec.rb b/spec/ruby/core/regexp/timeout_spec.rb
index c64103c82c..a1ec475ef3 100644
--- a/spec/ruby/core/regexp/timeout_spec.rb
+++ b/spec/ruby/core/regexp/timeout_spec.rb
@@ -17,7 +17,7 @@ describe "Regexp.timeout" do
-> {
# A typical ReDoS case
/^(a*)*$/ =~ "a" * 1000000 + "x"
- }.should raise_error(Regexp::TimeoutError, "regexp match timeout")
+ }.should.raise(Regexp::TimeoutError, "regexp match timeout")
end
it "raises Regexp::TimeoutError after timeout keyword value elapsed" do
@@ -28,6 +28,6 @@ describe "Regexp.timeout" do
-> {
re =~ "a" * 1000000 + "x"
- }.should raise_error(Regexp::TimeoutError, "regexp match timeout")
+ }.should.raise(Regexp::TimeoutError, "regexp match timeout")
end
end