Hi group,
A prize (or at least a big thank you) to anyone who can tell me why
commenting in the 2nd line stops anything from being output.
require 'open3'
#require 'win32console'
Open3.popen2('svn info') do |stdin, stdout, wait_thr|
stdout.each do |line|
puts line
end
end
Extra bonus points will be awarded if you tell me how to fix it :)
Cheers,
James
on 2012-02-02 15:51
on 2012-04-10 17:50
-----Original Message-----
From: James French [mailto:James.French@naturalmotion.com]
Sent: 02 February 2012 14:51
To: ruby-talk ML
Subject: win32console and open3 incompatibility
Hi group,
A prize (or at least a big thank you) to anyone who can tell me why
commenting in the 2nd line stops anything from being output.
require 'open3'
#require 'win32console'
Open3.popen2('svn info') do |stdin, stdout, wait_thr|
stdout.each do |line|
puts line
end
end
Extra bonus points will be awarded if you tell me how to fix it :)
Cheers,
James
Just came back to this and was able to workaround it by commenting out
the line 'opts[:in] = in_r' in popen2. I don't really understand this
area, but am recording my 'fix' for posterity :)
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.