summaryrefslogtreecommitdiff
path: root/test/ostruct/test_ostruct.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-24 18:08:15 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-24 18:08:15 +0000
commite565c838ce2f70f7f632aa0b728430fe195357fb (patch)
tree6e60acf1dff6953a87fc6ccb61137c962feac16f /test/ostruct/test_ostruct.rb
parente077e7956a63cbe266368d034fa76a35020cf78e (diff)
lib/ostruct.rb: Use frozen literals.
Patch adapted from Espartaco Palma. [GH-1714] [Bug #14000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ostruct/test_ostruct.rb')
-rw-r--r--test/ostruct/test_ostruct.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb
index 32eb73a89d..24ffb77380 100644
--- a/test/ostruct/test_ostruct.rb
+++ b/test/ostruct/test_ostruct.rb
@@ -52,12 +52,14 @@ class TC_OpenStruct < Test::Unit::TestCase
foo.bar = 1
foo.baz = 2
assert_equal("#<OpenStruct bar=1, baz=2>", foo.inspect)
+ assert_equal(false, foo.inspect.frozen?)
foo = OpenStruct.new
foo.bar = OpenStruct.new
assert_equal('#<OpenStruct bar=#<OpenStruct>>', foo.inspect)
foo.bar.foo = foo
assert_equal('#<OpenStruct bar=#<OpenStruct foo=#<OpenStruct ...>>>', foo.inspect)
+ assert_equal(false, foo.inspect.frozen?)
end
def test_frozen