mod_ruby icon indicating copy to clipboard operation
mod_ruby copied to clipboard

add Apache::Request#flush method for Kernel#spawn.

Open nishidayuya opened this issue 12 years ago • 0 comments

mod_ruby application cannot call Kernel#spawn. Because Kernel#spawn requires $stdout.flush and mod_ruby replaces $stdout to Apache::Request instance (no flush method).

This pull-request fixes it.

An example:

require "open3"

out, status = *Open3.capture2("ls")  #=> /home/yuya/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open3.rb:211:in `spawn': undefined method `flush' for #<Apache::Request:0x007f5e76f5a628> (NoMethodError)
puts(out)

nishidayuya avatar Oct 26 '13 01:10 nishidayuya