summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ostruct.rb3
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