IO.open does not seem to work in jruby --------------------------------------
Key: JRUBY-6225 URL: https://jira.codehaus.org/browse/JRUBY-6225 Project: JRuby Issue Type: Bug Components: Ruby 1.8.7, Ruby 1.9.2 Affects Versions: JRuby 1.6.5 Environment: Windows 7 64 bit Reporter: Stephen O'Donnell I have some code that works in MRI Ruby, and opens a pipe to processes and then writes to their standard input. The following code works in MRI ruby (1.8.7 and 1.9.2) and exits with a zero (which is set in $?): IO.popen("mysql -usodonnel -psodonnel", "w") do |p| p.puts "use sodonnel;" p.puts "select 1 from duall;" p.puts "exit" end puts $? However in JRuby 1.6.5, it fails to open any process I attempt, setting 256 into $?. The behaviour is the same with or without the --1.9 switch. No exceptions are raised except by setting $?. Is this a bug or limitation? I have not yet tried this on Linux to see if it is a Windows specific issue. My JRuby version is: C:\Users\sodonnel\code\dbgeni>jruby -v jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [Windows 7-amd64-java] -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email