lib/ostruct.rb: Revert "To use RuntimeError instead of FrozenError for old ruby versions."

This reverts commit 4cd1fc8b3559353069860eee90b1b5bade013917.
This commit is contained in:
Marc-Andre Lafortune 2020-09-02 15:34:33 -04:00
parent 3b0bcaf287
commit fbaab562d9
2 changed files with 4 additions and 6 deletions

View file

@ -170,8 +170,7 @@ class OpenStruct
begin
@modifiable = true
rescue
exception_class = defined?(FrozenError) ? FrozenError : RuntimeError
raise exception_class, "can't modify frozen #{self.class}", caller(3)
raise FrozenError, "can't modify frozen #{self.class}", caller(3)
end
@table
end