diff --git a/lib/set.rb b/lib/set.rb index e639636c97..921f18f97b 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -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