{|(a,a)|}

e$B0J2<$,%(%i!<$K$J$j$^$;$s!#e(B

% ./ruby -vce ‘m() {|(a,a)|}’
ruby 1.9.0 (2007-08-19 patchlevel 0) [i686-linux]
Syntax OK

duplicated argument name e$B$G$O$J$$$G$7$g$&$+!#e(B

% ./ruby -vce ‘m() {|a,a|}’
ruby 1.9.0 (2007-08-19 patchlevel 0) [i686-linux]
-e:1: duplicated argument name
m() {|a,a|}
^

In article [email protected],
Tanaka A. [email protected] writes:

e$B0J2<$,%(%i!<$K$J$j$^$;$s!#e(B

% ./ruby -vce ‘m() {|(a,a)|}’
ruby 1.9.0 (2007-08-19 patchlevel 0) [i686-linux]
Syntax OK

duplicated argument name e$B$G$O$J$$$G$7$g$&$+!#e(B

{|a,(a)|} [email protected]$H$J$i$J$/$F!"e(B{|(a),a|}
[email protected]$H$J$k$3$H$K5$$,$D$-$^$7$?!#e(B

% ./ruby -ce ‘m {|a,(a)|}’
Syntax OK
% ./ruby -ce ‘m {|(a),a|}’
-e:1: duplicated argument name
m {|(a),a|}
^

e$B$&$%$`!"$J$s$H$b!#e(B

[email protected]$G$9!#e(B

At Sun, 19 Aug 2007 15:54:50 +0900,
Tanaka A. wrote in [ruby-dev:31502]:

e$B0J2<$,%(%i!<$K$J$j$^$;$s!#e(B

% ./ruby -vce ‘m() {|(a,a)|}’
ruby 1.9.0 (2007-08-19 patchlevel 0) [i686-linux]
Syntax OK

duplicated argument name e$B$G$O$J$$$G$7$g$&$+!#e(B

e$B$$$C$=e(Bduplicated argument
namee$B$r$J$/$7$A$c$&$C$F$N$O$I$&$G$9$+!#e(B

Index: parse.y

— parse.y (revision 13128)
+++ parse.y (working copy)
@@ -4155,4 +4155,5 @@ f_norm_arg : tCONSTANT
| tIDENTIFIER
{

  •  shadowing_lvar($1);
     $$ = $1;
       }
    

@@ -4164,5 +4165,4 @@ f_arg_item : f_norm_arg
if (!is_local_id($1))
yyerror(“formal argument must be local variable”);

  •  shadowing_lvar($1);
     arg_var($1);
     $$ = NEW_ARGS_AUX($1, 1);

In article [email protected],
Nobuyoshi N. [email protected] writes:

e$B$$$C$=e(Bduplicated argument namee$B$r$J$/$7$A$c$&$C$F$N$O$I$&$G$9$+!#e(B

e$B$"$F$k$H!"0J2<$N$h$&$K$J$j$^$9!#e(B

% ./ruby -ce ‘m() {|(a,a)|}’
-e:1: duplicated argument name
m() {|(a,a)|}
^
% ./ruby -ce ‘m() {|a,a|}’
-e:1: duplicated argument name
m() {|a,a|}
^

[email protected]$H;W$$$^$9!#e(B

[email protected]!"$3$NJQ2=$r!V$J$/$7$A$c$&!W$HI=8=$9$k$N$O$h$/$o$+$j$^$;e(B
e$B$s!#e(B

[email protected]$G$9!#e(B

At Wed, 22 Aug 2007 16:33:42 +0900,
Tanaka A. wrote in [ruby-dev:31593]:

e$B$$$C$=e(Bduplicated argument namee$B$r$J$/$7$A$c$&$C$F$N$O$I$&$G$9$+!#e(B

[email protected]!"$3$NJQ2=$r!V$J$/$7$A$c$&!W$HI=8=$9$k$N$O$h$/$o$+$j$^$;e(B
e$B$s!#e(B

e$B$$$d!"@h$N%Q%C%A$O%A%’%C%/$7$Fe(Bsyntax errore$B$K$9$k$b$N$G$9!#e(B

e$B0z?t$N=EJ#$b2D$K$7$A$c$&$H$$$&$N$O;[email protected]$1$G!":n$C$F$^$;$s!#e(B
e$B$^[email protected]!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31590] Re: {|(a,a)|}”
on Wed, 22 Aug 2007 15:32:10 +0900, Nobuyoshi N.
[email protected] writes:

|> % ./ruby -vce ‘m() {|(a,a)|}’
|> ruby 1.9.0 (2007-08-19 patchlevel 0) [i686-linux]
|> Syntax OK
|>
|> duplicated argument name e$B$G$O$J$$$G$7$g$&$+!#e(B
|
|e$B$$$C$=e(Bduplicated argument namee$B$r$J$/$7$A$c$&$C$F$N$O$I$&$G$9$+!#e(B

e$BF1$8L>A0$rJ#?t5v$7$F4r$7$$$3$H$,$"$j$^$9$+$M$(!#[email protected]!“e(Bplace
holdere$B$,M_$7$$$3$H$O$”$k$s$G!"!Ve([email protected]$1$O=EJ#%A%’%C%/$+$i$O$:e(B
e$B$9$H$+$O9M$($?$3$H$,$"$j$^$9!#e(Bplace
holdere$B$NL>A0$O!Ve(B_e$B!W$K8BDje(B
e$B$9$kI,MW$O$J$$!"=EJ#$7$?$N$O$5$;$??M$N<[email protected]$!"$H$$$&$N$b0le(B
e$B$D$N9M$($G$9$,!#e(B

e$B$=$l$O$=$l$H$7$F!"%Q%C%A$O%3%_%C%H$7$F$/[email protected]$5$$!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs