From e565c838ce2f70f7f632aa0b728430fe195357fb Mon Sep 17 00:00:00 2001 From: marcandre Date: Tue, 24 Oct 2017 18:08:15 +0000 Subject: 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 --- test/ostruct/test_ostruct.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ostruct/test_ostruct.rb') 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("#", foo.inspect) + assert_equal(false, foo.inspect.frozen?) foo = OpenStruct.new foo.bar = OpenStruct.new assert_equal('#>', foo.inspect) foo.bar.foo = foo assert_equal('#>>', foo.inspect) + assert_equal(false, foo.inspect.frozen?) end def test_frozen -- cgit v1.2.3