diff options
author | Marc-Andre Lafortune <[email protected]> | 2020-09-02 15:34:33 -0400 |
---|---|---|
committer | Marc-Andre Lafortune <[email protected]> | 2020-09-04 01:23:14 -0400 |
commit | fbaab562d99c220bd481c17522c02c865ba7c44c (patch) | |
tree | 5fe4020a5b9117d5ce779af2bdbdac26aa0c0ed5 /lib/ostruct.rb | |
parent | 3b0bcaf2872e5ab6d2475e9cd6dd5c374d93ae0b (diff) |
lib/ostruct.rb: Revert "To use RuntimeError instead of FrozenError for old ruby versions."
This reverts commit 4cd1fc8b3559353069860eee90b1b5bade013917.
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r-- | lib/ostruct.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb index 09d81b8a5a..b49df2d2d6 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -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 |