[#64210] Asking for clarification for exception handling usage — Rodrigo Rosenfeld Rosas <rr.rosas@...>
I've created a ticket for that but didn't get any feedback so I decided
[#64517] Fw: Re: Ruby and Rails to become Apache Incubator Project — Tetsuya Kitahata <kitahata@99.alumni.u-tokyo.ac.jp>
What do you think? >> Ruby developers
What benefits are there to this? I have a feeling that adding unnecessary
On Sat, 23 Aug 2014 22:43:46 -0700
Here I am a Japanese. Before moving anywhere else answer to our question first: what benefits?
tax issue with each other.
Forgot to assert my opinions:
[#64614] cowspace (work-in-progress) — Eric Wong <normalperson@...>
Hi all, I started working on a cowspace branch. Based on the mspace API
[#64615] [ruby-trunk - Feature #10181] [Open] New method File.openat() — oss-ruby-lang@...
Issue #10181 has been reported by Technorama Ltd..
I like this feature.
On 08/28/2014 02:53 PM, Eric Wong wrote:
Joel VanderWerf <joelvanderwerf@gmail.com> wrote:
On 08/29/2014 12:55 AM, Eric Wong wrote:
Joel VanderWerf <joelvanderwerf@gmail.com> wrote:
[#64627] [ruby-trunk - Feature #10182] [PATCH] string.c: move frozen_strings table to rb_vm_t — ko1@...
Issue #10182 has been updated by Koichi Sasada.
[#64671] Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...>
Why this fix solve your problem?
(2014/08/30 8:50), SASADA Koichi wrote:
SASADA Koichi <ko1@atdot.net> wrote:
Eric Wong <normalperson@yhbt.net> wrote:
(2014/08/31 0:18), Eric Wong wrote:
[ruby-core:64339] [ruby-trunk - Bug #10128] [Open] Quoting problem for arguments of Kernel.system, Kernel.exec on Windows
Issue #10128 has been reported by Maxime Lapointe.
----------------------------------------
Bug #10128: Quoting problem for arguments of Kernel.system, Kernel.exec on Windows
https://bugs.ruby-lang.org/issues/10128
* Author: Maxime Lapointe
* Status: Open
* Priority: Normal
* Assignee: cruby-windows
* Category: platform/windows
* Target version:
* ruby -v: ruby 2.0.0p481 (2014-05-08) [x64-mingw32]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
On Windows, the methods that call shell commands and receive the parameters individually sometimes do not wrap the parameters sent in quotes.
This results in Windows either splitting the parameter in 2 parameters or, worse, splitting the command in 2 commands.
I joined the file *puts_first.bat*, which simply outputs the first argument it received. When the parameter received was wrapped by ruby, you will see quotes, it's normal. Just run a irb from from the directory containing that file.
Lines that don't work properly (Using Kernel.exec will do the same thing):
# these write *hello*, then says 'world' is not recognized as an internal or external command
Kernel.system 'puts_first.bat', 'hello&world'
Kernel.system 'puts_first.bat', 'hello|world'
# these write *hello*
Kernel.system 'puts_first.bat', 'hello,world'
Kernel.system 'puts_first.bat', 'hello;world'
Kernel.system 'puts_first.bat', 'hello<world'
# this writes *hello* in the file world
Kernel.system 'puts_first.bat', 'hello>world'
# this writes *helloworld* without the ^
Kernel.system 'puts_first.bat', 'hello^world'
If we add a space anywhere in the above hello world strings, it will work as expected because ruby wraps the parameter if it finds a space.
# Ruby does try to wrap if it finds a double quote, but it escapes double quotes incorrectly:
# this writes *"hello\"world"*, double quotes should be escaped by putting 2 of them, so we should see: *"hello""world"*
Kernel.system 'puts_first.bat', 'hello"world'
# adding a space show the problem in action, this writes *"hello\"*
Kernel.system 'puts_first.bat', 'hello" world'
As a side note, the single quote is not special in Windows, so there is no need to wrap this (but I don't think it's a problem):
# this writes *"hello'world"*
Kernel.system 'puts_first.bat', "hello'world"
This bug also happens in 1.9.3, do you think this be backported?
Unless I did a mistake, this should be all of the problematic characters, I tested with every printable ascii characters.
Thank you
---Files--------------------------------
puts_first.bat (18 Bytes)
--
https://bugs.ruby-lang.org/