You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here an example (command prompt session) on Windows where JRuby is removing double quotes from strings before executing them through Kernel#system (which deviates from the behavior on CRuby):
C:\test>file test.rb
test.rb: ASCII text, with CRLF line terminators
C:\test>type test.rb
system "echo \"Hi\""
C:\test>ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
C:\test>ruby test.rb
"Hi"
C:\test>jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.74-b02 on 1.8.0_74-b02 +jit [Windows 10-amd64]
C:\test>jruby test.rb
Hi
C:\test>echo "Hi"
"Hi"
C:\test>echo Hi
Hi
C:\test>
I believe that this could cause problems on Windows (especially since files and folders with spaces need to be enclosed in double quotes when not escaping spaces individually (especially when using fully qualified names)). For example, I personally have a small ruby script that I use to back up and restore PostgreSQL databases that would not work on JRuby like it does on CRuby due to this behavior (https://gist.github.com/preetpalS/025c878a0d200842fc22 (method on line 80 is affected)) although I have a workaround of just printing the system commands out so I that can copy and paste them.
The text was updated successfully, but these errors were encountered:
Here an example (command prompt session) on Windows where JRuby is removing double quotes from strings before executing them through Kernel#system (which deviates from the behavior on CRuby):
I believe that this could cause problems on Windows (especially since files and folders with spaces need to be enclosed in double quotes when not escaping spaces individually (especially when using fully qualified names)). For example, I personally have a small ruby script that I use to back up and restore PostgreSQL databases that would not work on JRuby like it does on CRuby due to this behavior (https://gist.github.com/preetpalS/025c878a0d200842fc22 (method on line 80 is affected)) although I have a workaround of just printing the system commands out so I that can copy and paste them.
The text was updated successfully, but these errors were encountered: