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:
parent
27f51081d3
commit
afd68cd871
@ -527,7 +527,7 @@ class Set
|
|||||||
if @hash.respond_to?(:rehash)
|
if @hash.respond_to?(:rehash)
|
||||||
@hash.rehash # This should perform frozenness check.
|
@hash.rehash # This should perform frozenness check.
|
||||||
else
|
else
|
||||||
raise "can't modify frozen #{self.class.name}" if frozen?
|
raise FrozenError, "can't modify frozen #{self.class.name}" if frozen?
|
||||||
end
|
end
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user