ruby-changes:43317
From: nobu <ko1@a...>
Date: Sun, 12 Jun 2016 23:20:56 +0900 (JST)
Subject: [ruby-changes:43317] nobu:r55391 (trunk): dump to stdout
nobu 2016-06-12 23:20:50 +0900 (Sun, 12 Jun 2016) New Revision: 55391 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55391 Log: dump to stdout * test/objspace/test_objspace.rb (test_dump_all): dump to stdout instead of a string, get rid of hung up. Modified files: trunk/test/objspace/test_objspace.rb Index: test/objspace/test_objspace.rb =================================================================== --- test/objspace/test_objspace.rb (revision 55390) +++ test/objspace/test_objspace.rb (revision 55391) @@ -308,9 +308,16 @@ class TestObjSpace < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/objspace/test_objspace.rb#L308 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/