[Rake-devel] Question about system call and multiple arguments.

Luis Lavena luislavena at gmail.com
Sat Nov 1 12:26:58 EDT 2008

Hello Everybody,

I asked before about this, since one thing I cannot stand are the
"SKIPPING test on windows" on any project, they make me think
something is broken with Windows or with Ruby implementation on

All this started with shell expansion of single argument system call:

And I raised some questions about system(...) behavior with one or
multiple arguments.

Back to the topic, here:

I'm trying to find the real problem about the implementation of
system(...) call for this test:


      # This one does not get expanded
      block_run = false
      ruby '-e', %{exit "#{env_var}".length} do |ok, status| # " (emacs wart)
        assert_equal 15, status.exitstatus
        block_run = true
      assert block_run, "The block must be run"

I just verified the output of the command being generated:

ruby -e exit "$RAKE_TEST_RUBY".length

And tested that on linux:


As you can see, the lack of quotes around the command for -e option is
generating the issue.

Did I miss something?

Thanks in advance for your time, I'm looking forward find the issue
behind this to properly patch ruby if required.

Luis Lavena
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

More information about the Rake-devel mailing list