ruby-changes:40225
From: nobu <ko1@a...>
Date: Tue, 27 Oct 2015 23:36:45 +0900 (JST)
Subject: [ruby-changes:40225] nobu:r52306 (trunk): test_marshal.rb: test_no_internal_ids
nobu 2015-10-27 23:36:35 +0900 (Tue, 27 Oct 2015) New Revision: 52306 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52306 Log: test_marshal.rb: test_no_internal_ids * test/ruby/test_marshal.rb (test_no_internal_ids): test for r52304, no internal IDs should be exposed by Marshal.dump. Modified files: trunk/test/ruby/test_marshal.rb Index: test/ruby/test_marshal.rb =================================================================== --- test/ruby/test_marshal.rb (revision 52305) +++ test/ruby/test_marshal.rb (revision 52306) @@ -695,4 +695,20 @@ class TestMarshal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_marshal.rb#L695 Marshal.load(d) } end + + def test_no_internal_ids + opt = %w[--disable=gems] + args = [opt, 'Marshal.dump("",STDOUT)', true, true, encoding: Encoding::ASCII_8BIT] + out, err, status = EnvUtil.invoke_ruby(*args) + assert_empty(err) + assert_predicate(status, :success?) + expected = out + + opt << "--enable=frozen-string-literal" + opt << "--enable=frozen-string-literal-debug" + out, err, status = EnvUtil.invoke_ruby(*args) + assert_empty(err) + assert_predicate(status, :success?) + assert_equal(expected, out) + end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/