[Bug #1031] -U $B%*%W%7%g%s$N@bL@$,(B --help $B$K$J$$(B

e$B%A%1%C%He(B #1031 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

e$B1sF#$G$9!#e(B

e$B$3$s$J$7$g$&$b$J$$%A%1%C%H$O$5$C$5$H7h$a$FJD$8$F$[$7$$!D!D!#e(B

2010e$BG/e(B3e$B7ne(B25e$BF|e(B15:11 Urabe S.
[email protected]:

e$B$^$"$$s$J$G$&$J$C$F$F$b$7$g$&$,$J$$$N$G2~A10F$r=P$7$F$$^$7$g$&$+!#e(B

ruby -h e$B$NA[Dj%f!<%6$O=i?4<T$H%3%^%s%I%i%$%s$G:n6H$9$k?M$J$N$G!"e(B
e$B7G:\4p=$b!VIaDL$K$h$/;H$o$l$k%*%W%7%g%s!W$H!V%o%s%i%$%J!<$G$h$/e(B e$B;H$o$l$k%*%W%7%g%s!W$K8BDj$7$?$i$$$$$H;W$$$^$7$?!#$3$N4p=$G8=:e(B
e$B7G:$5$l$F$$$k%%W%7%g%s$r<g4QE$KI>2A$7$F$
$^$7$?!#e(B

e$B!{IaDL$K$h$/;H$o$l$ke(B

  • 1 e$B5ie(B: -e -I -r -v (-h)
  • 2 e$B5ie(B: -d -T -w -W
  • 3 e$B5ie(B: -E (-U)

e$B!{%o%s%i%$%J!<$G$h$/;H$o$l$ke(B

  • 1 e$B5ie(B: -l -n -p
  • 2 e$B5ie(B: -0 -a -F -i

e$B0J>e$+$i!"e(B

  • ruby -h e$B$+$ie(B -c -s -S -x --version e$B$r:o=|$9$ke(B
  • -U e$B$rDI2C$9$ke(B

e$B$G$I$&$G$7$g$&!#e(B–copyright
e$B$O@/<#E*$JM}M3$GI,MW$+$b$7$l$J$$$N$Ge(B
e$B;D$7$^$7$?e(B (e$B$H$$$C$F$b$^$D$b$H$5$s$NL>A0$7$+=P$J$$$N$Ge(B LEGAL
e$B$Ne(B
e$BBe$o$j$K$O$J$i$J$$$h$&$G$9$,e(B) e$B!#e(B

diff --git a/ruby.c b/ruby.c
index 5c1eef0…2a36cb6 100644
— a/ruby.c
+++ b/ruby.c
@@ -135,7 +135,6 @@ usage(const char *name)
static const char *const usage_msg[] = {
“-0[octal] specify record separator (\0, if no argument)”,
“-a autosplit mode with -n or -p (splits $_ into $F)”,

  • “-c check syntax only”,
    “-Cdirectory cd to directory, before executing your script”,
    “-d set debugging flags (set $DEBUG to true)”,
    “-e ‘command’ one line of script. Several -e’s allowed. Omit
    [programfile]”,
    @@ -147,13 +146,11 @@ usage(const char *name)
    “-n assume ‘while gets(); … end’ loop around your
    script”,
    “-p assume loop like -n but print line also like sed”,
    “-rlibrary require the library, before executing your script”,
  • “-s enable some switch parsing for switches after script
    name”,
  • “-S look for the script using PATH environment
    variable”,
    “-T[level=1] turn on tainting checks”,
  • “-U set internal character encoding as UTF-8”,
    “-v print version number, then turn on verbose mode”,
    “-w turn warnings on for your script”,
    “-W[level=2] set warning level; 0=silence, 1=medium, 2=verbose”,
  • “-x[directory] strip off text before #!ruby line and perhaps cd to
    directory”,
    “–copyright print the copyright”,
    “–version print the version”,
    NULL

–long-help e$B$J$je(B -v -h
e$B$J$j$,M_$7$$?M$O!"<+J,$GJ80F$r:n@.$7$Fe(B
e$BDs0F$9$l$P$$$$$H;W$$$^$9!#e(B


Yusuke ENDOH [email protected]

http://redmine.ruby-lang.org/issues/show/1031