diff --git a/lib/rspec/matchers/built_in/raise_error.rb b/lib/rspec/matchers/built_in/raise_error.rb index 162fe056d..1422f1fe6 100644 --- a/lib/rspec/matchers/built_in/raise_error.rb +++ b/lib/rspec/matchers/built_in/raise_error.rb @@ -25,7 +25,7 @@ def initialize(expected_error_or_message, expected_message, &block) when nil, UndefinedValue @expected_error = Exception @expected_message = expected_message - when String + when String, Regexp @expected_error = Exception @expected_message = expected_error_or_message else