[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...

Issue #10333 has been updated by Koichi Sasada.

9 messages 2014/10/07

[ruby-core:65465] [ruby-trunk - Bug #10336] limit of number of arguments passed to system

From: vpereira@...
Date: 2014-10-07 12:15:41 UTC
List: ruby-core #65465
Issue #10336 has been updated by Victor Pereira.


system("ls #{files_to_be_p_as_a.join(' ')}") 
# => nil
system("ls #{files_to_be_p_as_a[0..2273].join(' ')}")
... # list of files
system("ls #{files_to_be_p_as_a[0..2274].join(' ')}") 

----------------------------------------
Bug #10336: limit of number of arguments passed to system
https://bugs.ruby-lang.org/issues/10336#change-49245

* Author: Victor Pereira
* Status: Open
* Priority: Normal
* Assignee: 
* Category: core
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The following code snipped stops to work with argument bigger than 2274:

~~~
files_to_be_p_as_a =  Dir[File.join(".", '**', '*.c')]
files_to_be_p_as_a.size 
# => 43152
system("ls #{files_to_be_p_as_a}") 
# => nil
system("ls #{files_to_be_p_as_a[0..2273]}")
... # list of files
system("ls #{files_to_be_p_as_a[0..2274]}" 
# => nil
~~~

is there any limitation on Kernel system or is it something in my local environment? 




-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next