From f54490251a3e121591689186f2b605ee29558d1f Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 12 Jun 2016 14:20:50 +0000 Subject: dump to stdout * test/objspace/test_objspace.rb (test_dump_all): dump to stdout instead of a string, get rid of hung up. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/objspace/test_objspace.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index d141fa9161..832c8d7f8e 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -308,9 +308,16 @@ class TestObjSpace < Test::Unit::TestCase end if defined?(JSON) - assert_ruby_status(%w[-rjson -robjspace], "#{<<-"begin;"}\n#{<<-"end;"}") + args = [ + "-rjson", "-", + EnvUtil.rubybin, + "--disable=gems", "-robjspace", "-eObjectSpace.dump_all(output: :stdout)", + ] + assert_ruby_status(args, "#{<<~"begin;"}\n#{<<~"end;"}") begin; - JSON.parse(ObjectSpace.dump_all(output: :string)) + IO.popen(ARGV) do |f| + JSON.load(f) + end end; end end -- cgit v1.2.3