⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (797 Bytes)
Bug #10563
» caller.rb
Runner script for calling callee.rb -
Maturin (Lars Benner)
, 12/02/2014 08:36 PM
# Uncomment only one of the two RUBY assignments
# Causing system() call to hang.
# On my system RUBY looked like this: C:/Projects/Head.Dev/Extern/ruby/mri/bin/ruby.exe
RUBY
=
RbConfig
.
ruby
# With this commnand the system() call works
#RUBY = RbConfig.ruby.gsub('/', '\\')
args
=
[]
args
<<
RUBY
# Script to start, only prints the given command line arguments on stdout
args
<<
'callee.rb'
500
.
times
do
|
n
|
# Increasing the length of the command line each iteration
args
<<
"
\"
ThisIsARatherLongArgument#
#{
n
}
\"
"
cmd
=
args
.
join
(
' '
)
puts
"------------------------------------------------------"
puts
"command length
#{
cmd
.
size
}
characters."
system
(
cmd
)
end
puts
"======================================================"
puts
"Done."
« Previous
1
2
Next »
(1-1/2)
Loading...