ruby-changes:36903
From: usa <ko1@a...>
Date: Thu, 25 Dec 2014 11:37:41 +0900 (JST)
Subject: [ruby-changes:36903] usa:r48984 (trunk): * test/io/console/test_io_console.rb (TestIO_Console#run_pty): no block given.
usa 2014-12-25 11:37:17 +0900 (Thu, 25 Dec 2014) New Revision: 48984 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48984 Log: * test/io/console/test_io_console.rb (TestIO_Console#run_pty): no block given. Modified files: trunk/test/io/console/test_io_console.rb Index: test/io/console/test_io_console.rb =================================================================== --- test/io/console/test_io_console.rb (revision 48983) +++ test/io/console/test_io_console.rb (revision 48984) @@ -256,7 +256,11 @@ class TestIO_Console < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L256 else result = r.readlines(&:chomp) Process.wait(pid) - yield result + if block_given? + yield result + else + result + end ensure r.close if r w.close if w -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/