diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-12 14:20:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-12 14:20:50 +0000 |
commit | 8b63623085328f12a59b66c2618eb1cfbc1b0bf3 (patch) | |
tree | c9be17538bbc026666e8e93dc2823086aeb05b4e /test/objspace | |
parent | a9490f49166afad22157db1e2cfdff72c4551bee (diff) | |
download | ruby-8b63623085328f12a59b66c2618eb1cfbc1b0bf3.tar.gz |
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
Diffstat (limited to 'test/objspace')
-rw-r--r-- | test/objspace/test_objspace.rb | 11 |
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 |