1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use FrozenError instead of frozen_error_class

This commit is contained in:
Nobuyoshi Nakada 2020-02-09 11:07:01 +09:00
parent 151f8be40d
commit 3a2073e61b
Notes: git 2020-04-01 15:36:48 +09:00
103 changed files with 367 additions and 385 deletions

View file

@ -17,12 +17,12 @@ describe :string_concat, shared: true do
-> { 'hello '.send(@method, mock('x')) }.should raise_error(TypeError)
end
it "raises a #{frozen_error_class} when self is frozen" do
it "raises a FrozenError when self is frozen" do
a = "hello"
a.freeze
-> { a.send(@method, "") }.should raise_error(frozen_error_class)
-> { a.send(@method, "test") }.should raise_error(frozen_error_class)
-> { a.send(@method, "") }.should raise_error(FrozenError)
-> { a.send(@method, "test") }.should raise_error(FrozenError)
end
it "returns a String when given a subclass instance" do
@ -89,12 +89,12 @@ describe :string_concat, shared: true do
-> { "".send(@method, x) }.should raise_error(TypeError)
end
it "raises a #{frozen_error_class} when self is frozen" do
it "raises a FrozenError when self is frozen" do
a = "hello"
a.freeze
-> { a.send(@method, 0) }.should raise_error(frozen_error_class)
-> { a.send(@method, 33) }.should raise_error(frozen_error_class)
-> { a.send(@method, 0) }.should raise_error(FrozenError)
-> { a.send(@method, 33) }.should raise_error(FrozenError)
end
end
end