diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_marshal.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 3548850a42..5aa13369a6 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -695,4 +695,20 @@ class TestMarshal < Test::Unit::TestCase 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 |