summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-12 14:20:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-12 14:20:50 +0000
commitf54490251a3e121591689186f2b605ee29558d1f (patch)
treec9be17538bbc026666e8e93dc2823086aeb05b4e
parent58edb064c3f7a8f1056599d4113bbf438f8a2982 (diff)
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
-rw-r--r--test/objspace/test_objspace.rb11
1 files 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