1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2016-06-12 14:20:50 +00:00
parent 58edb064c3
commit f54490251a

View file

@ -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