Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre1
Assignee: Thomas E Enebo
Created: 06/Aug/12 9:21 AM
Description:

In IO#popen, to bypass the shell for avoiding messy shell escaping and potential security hole, giving command-line as an array containing string objects is available since Ruby 1.9. However, on JRuby, when passing arguments with shell special characters to IO#popen, whole arguments seem to be omitted.

$ jruby -v -e 'p IO.popen(["/bin/echo", "(a)", "*" ], "r+") { |io| io.read }'
jruby 1.7.0.preview1 (ruby-1.9.3-p203) (2012-05-19 00c8c98) (OpenJDK 64-Bit Server VM 1.6.0_20) [linux-amd64-java]
"\n"

In MRI, the /bin/echo works correctly.

$ ruby -v -e 'p IO.popen(["/bin/echo", "(a)", "*" ], "r+") { |io| io.read }'
ruby 1.9.3p253 (2012-07-04) [x86_64-linux]
"(a) *\n"
Project: JRuby
Priority: Major Major
Reporter: Naohisa Goto
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to