aboutsummaryrefslogtreecommitdiffstats
path: root/test/ostruct
diff options
context:
space:
mode:
Diffstat (limited to 'test/ostruct')
-rw-r--r--test/ostruct/test_ostruct.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb
index 5e0f4b2418..8adfd0159a 100644
--- a/test/ostruct/test_ostruct.rb
+++ b/test/ostruct/test_ostruct.rb
@@ -43,5 +43,9 @@ class TC_OpenStruct < Test::Unit::TestCase
assert_not_respond_to(o, :b)
assert_raise(TypeError) {o.a = 'z'}
assert_equal('a', o.a)
+ o = OpenStruct.new :a => 42
+ def o.frozen?; nil end
+ o.freeze
+ assert_raise(TypeError, '[ruby-core:22559]') {o.a = 1764}
end
end