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:
parent
58edb064c3
commit
f54490251a
1 changed files with 9 additions and 2 deletions
|
@ -308,9 +308,16 @@ class TestObjSpace < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
if defined?(JSON)
|
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;
|
begin;
|
||||||
JSON.parse(ObjectSpace.dump_all(output: :string))
|
IO.popen(ARGV) do |f|
|
||||||
|
JSON.load(f)
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue