diff options
Diffstat (limited to 'spec/ruby/core/string/shared/replace.rb')
| -rw-r--r-- | spec/ruby/core/string/shared/replace.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/string/shared/replace.rb b/spec/ruby/core/string/shared/replace.rb index 9f5446fbbe..a583b88b5a 100644 --- a/spec/ruby/core/string/shared/replace.rb +++ b/spec/ruby/core/string/shared/replace.rb @@ -62,14 +62,14 @@ describe :string_replace, shared: true do lambda { "hello".send(@method, mock('x')) }.should raise_error(TypeError) end - it "raises a RuntimeError on a frozen instance that is modified" do + it "raises a #{frozen_error_class} on a frozen instance that is modified" do a = "hello".freeze - lambda { a.send(@method, "world") }.should raise_error(RuntimeError) + lambda { a.send(@method, "world") }.should raise_error(frozen_error_class) end # see [ruby-core:23666] - it "raises a RuntimeError on a frozen instance when self-replacing" do + it "raises a #{frozen_error_class} on a frozen instance when self-replacing" do a = "hello".freeze - lambda { a.send(@method, a) }.should raise_error(RuntimeError) + lambda { a.send(@method, a) }.should raise_error(frozen_error_class) end end |
