mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
lib/ostruct.rb: Revert "To use RuntimeError instead of FrozenError for old ruby versions."
This reverts commit 4cd1fc8b3559353069860eee90b1b5bade013917.
This commit is contained in:
parent
3b0bcaf287
commit
fbaab562d9
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue