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

raise FrozenError instead of RuntimeError

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2019-01-20 04:44:25 +00:00
parent 27f51081d3
commit afd68cd871

View file

@ -527,7 +527,7 @@ class Set
if @hash.respond_to?(:rehash)
@hash.rehash # This should perform frozenness check.
else
raise "can't modify frozen #{self.class.name}" if frozen?
raise FrozenError, "can't modify frozen #{self.class.name}" if frozen?
end
self
end