Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5.3
-
Fix Version/s: JRuby 1.5.4, JRuby 1.6RC1
-
Component/s: None
-
Labels:None
-
Environment:Windows XP SP3, Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
-
Number of attachments :
Description
1.5.3 jruby doesn't work with ``, it just returns "".
Test code:
puts `c:/ssh/plink.exe`.inspect
Results:
C:\nebula-web\main>pik use jruby
Select which Ruby you want:
1. 153: jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSp
ot(TM) Client VM 1.6.0_21) [x86-java]
2. 141: jruby 1.4.1 (ruby 1.8.7 patchlevel 174) (2010-04-26 ea6db6a) (Java HotSp
ot(TM) Client VM 1.6.0_21) [x86-java]
? 1C:\nebula-web\main>jruby -v
jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSpot(TM) C
lient VM 1.6.0_21) [x86-java]C:\nebula-web\main>jruby test.rb
""C:\nebula-web\main>pik use jruby
Select which Ruby you want:
1. 153: jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSp
ot(TM) Client VM 1.6.0_21) [x86-java]
2. 141: jruby 1.4.1 (ruby 1.8.7 patchlevel 174) (2010-04-26 ea6db6a) (Java HotSp
ot(TM) Client VM 1.6.0_21) [x86-java]
? 2C:\nebula-web\main>jruby -v
jruby 1.4.1 (ruby 1.8.7 patchlevel 174) (2010-04-26 ea6db6a) (Java HotSpot(TM) C
lient VM 1.6.0_21) [x86-java]C:\nebula-web\main>jruby test.rb
"PuTTY Link: command-line connection utility\r\nRelease 0.60\r\nUsage: plink [op
tions] [user@]host [command]\r\n (\"host\" can also be a PuTTY saved sessi
on name)\r\nOptions:\r\n -V print version information and exit\r\n -pgp
fp print PGP key fingerprints and exit\r\n -v show verbose messages\r
\n -load sessname Load settings from saved session\r\n -ssh -telnet -rlogin -
raw\r\n force use of a particular protocol\r\n -P port connect to
specified port\r\n -l user connect with specified username\r\n -batch dis
able all interactive prompts\r\nThe following options only apply to SSH connecti
ons:\r\n -pw passw login with specified password\r\n -D [listen-IP:]listen-por
t\r\n Dynamic SOCKS-based port forwarding\r\nL [listen-IP:]listen
port:host:port\r\n Forward local port to remote address\r\n -R [list
en-IP:]listen-port:host:port\r\n Forward remote port to local address
\r\n -X -x enable / disable X11 forwarding\r\n -A -a enable / disable
agent forwarding\r\n -t -T enable / disable pty allocation\r\n -1 -2 f
orce use of particular protocol version\r\n -4 -6 force use of IPv4 or IPv6
\r\n -C enable compression\r\n -i key private key file for authentic
ation\r\n -noagent disable use of Pageant\r\n -agent enable use of Pageant
\r\n -m file read remote command(s) from file\r\n -s remote command i
s an SSH subsystem (SSH-2 only)\r\nN don't start a shell/command (SSH
2 only)\r\n -nc host:port\r\n open tunnel in place of session (SSH-2
only)\r\n"
Strangely enough jruby 1.5.3 can call itself:
C:\nebula-web\main>jirb
irb(main):001:0> `jruby -v`
=> "jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSpot(T
M) Client VM 1.6.0_21) [x86-java]\n"
However `` works fine on Ubuntu:
arturas@arturaz-fujitsu:~/Software/jruby-1.5.3/bin$ java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
arturas@arturaz-fujitsu:~/Software/jruby-1.5.3/bin$ jirb
irb(main):001:0> `ssh -v`
OpenSSH_5.3p1 Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-w local_tun[:remote_tun]] [user@]hostname [command]
=> ""
irb(main):002:0> `echo aa`
=> "aa\n"
This behaviour breaks bundler gem, because it depends on invoking commands via ``.
Issue Links
- duplicates
-
JRUBY-5110
kernel.system not working in 1.5.3 on Windows
-
This is probably a dup already solved