Project

General

Profile

Actions

Feature #7981

open

ruby does not respect --

Added by mpapis (Michal Papis) over 11 years ago. Updated over 11 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:53016]

Description

=begin
in ((%ruby --help%)) I have found:

Usage: ruby [switches] [--] [programfile] [arguments]

so I have tried this example:

$ echo 'puts :ok' | ruby -- --params
> ruby: No such file or directory -- --params (LoadError)

I have assumed that ((%[argumments]%)) are independent from ((%[programfile]%))

In the current state of code the help message should be:

Usage: ruby [switches] [--] [programfile [arguments]]

But I would prefer that it would be fixed and anything after ((%[--]%)) that is not program gets ignored, so we can use the shell style:

$ echo 'echo "args:$*:"' | bash -s -- --params
> args:--params:

=end

Actions #1

Updated by marcandre (Marc-Andre Lafortune) over 11 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport200 to Ruby master
Actions #2

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Tracker changed from Bug to Feature

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0