aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/string/gsub_spec.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-09 11:07:01 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-01 15:36:20 +0900
commit3a2073e61b6ccce6d07d31ebd89d4c385b9a55f2 (patch)
treeb4697ea23f16f340589d27b4f4c046233b2bd106 /spec/ruby/core/string/gsub_spec.rb
parent151f8be40d385ada2ebf7feb84210ed7db7ef4df (diff)
downloadruby-3a2073e61b6ccce6d07d31ebd89d4c385b9a55f2.tar.gz
Use FrozenError instead of frozen_error_class
Diffstat (limited to 'spec/ruby/core/string/gsub_spec.rb')
-rw-r--r--spec/ruby/core/string/gsub_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/string/gsub_spec.rb b/spec/ruby/core/string/gsub_spec.rb
index f1d2d5ac06..8193464d48 100644
--- a/spec/ruby/core/string/gsub_spec.rb
+++ b/spec/ruby/core/string/gsub_spec.rb
@@ -613,13 +613,13 @@ describe "String#gsub! with pattern and replacement" do
end
# See [ruby-core:23666]
- it "raises a #{frozen_error_class} when self is frozen" do
+ it "raises a FrozenError when self is frozen" do
s = "hello"
s.freeze
- -> { s.gsub!(/ROAR/, "x") }.should raise_error(frozen_error_class)
- -> { s.gsub!(/e/, "e") }.should raise_error(frozen_error_class)
- -> { s.gsub!(/[aeiou]/, '*') }.should raise_error(frozen_error_class)
+ -> { s.gsub!(/ROAR/, "x") }.should raise_error(FrozenError)
+ -> { s.gsub!(/e/, "e") }.should raise_error(FrozenError)
+ -> { s.gsub!(/[aeiou]/, '*') }.should raise_error(FrozenError)
end
end
@@ -652,13 +652,13 @@ describe "String#gsub! with pattern and block" do
end
# See [ruby-core:23663]
- it "raises a #{frozen_error_class} when self is frozen" do
+ it "raises a FrozenError when self is frozen" do
s = "hello"
s.freeze
- -> { s.gsub!(/ROAR/) { "x" } }.should raise_error(frozen_error_class)
- -> { s.gsub!(/e/) { "e" } }.should raise_error(frozen_error_class)
- -> { s.gsub!(/[aeiou]/) { '*' } }.should raise_error(frozen_error_class)
+ -> { s.gsub!(/ROAR/) { "x" } }.should raise_error(FrozenError)
+ -> { s.gsub!(/e/) { "e" } }.should raise_error(FrozenError)
+ -> { s.gsub!(/[aeiou]/) { '*' } }.should raise_error(FrozenError)
end
it "uses the compatible encoding if they are compatible" do