Unparenthesized method call with block

e$B1sF#$H?=$7$^$9!#e(B

e$B0J2<$G%(%i!<$b?t;z$b=PNO$5$l$J$$$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B

$ ./ruby -ve ‘1.upto 10 {|v| p v }’
ruby 1.9.0 (2007-12-19 patchlevel 0) [i686-linux]
$

parse.y e$B$K;vee(B cmd_brace_block e$B$r;H$C$F$J$$%k!<%k$,e(B 2
e$B$D$"$j$^$7$?!#e(B
e$B$3$&$J$C$?$N$Oe(B r10235 e$B$+$i$G!"$=$Ne(B Changelog e$B$Ke(B

  • parse.y: remove some obsolete syntax rules (unparenthesized
    method calls in argument list).

e$B$H$"$j$^$7$?!#$*$=$i$/$3$N%k!<%k$O=|5n$5$l$k$Y$-$J$s$G$O$J$$$G$7$g$&$+!#e(B

Index: parse.y

— parse.y (revision 14333)
+++ parse.y (working copy)
@@ -1260,17 +1260,6 @@
$$ = dispatch2(command, $1, $2);
%*/
}

  • | operation command_args cmd_brace_block
  •    {
    
  •    /*%%%*/
    
  •  $$ = NEW_FCALL($1, $2);
    
  •  block_dup_check($2,$3);
    
  •  fixpos($$, $2);
    
  •    /*%
    
  •  $$ = dispatch2(command, $1, $2);
    
  •  $$ = method_add_block($$, $3);
    
  •    %*/
    
  •    }
    
    | primary_value ‘.’ operation2 command_args %prec tLOWEST
    {
    /%%%/
    @@ -1280,17 +1269,6 @@
    $$ = dispatch4(command_call, $1, ripper_id2sym(’.’), $3, $4);
    %*/
    }
  • | primary_value ‘.’ operation2 command_args cmd_brace_block
  •    {
    
  •    /*%%%*/
    
  •  $$ = NEW_CALL($1, $3, $4);
    
  •  block_dup_check($4,$5);
    
  •  fixpos($$, $1);
    
  •    /*%
    
  •  $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
    
  •  $$ = method_add_block($$, $5);
    
  •    %*/
    
  •   }
    
    | primary_value tCOLON2 operation2 command_args %prec tLOWEST
    {
    /%%%/

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

In message “Re: [ruby-dev:32645] unparenthesized method call with block”
on Wed, 19 Dec 2007 22:52:02 +0900, “Yusuke ENDOH” [email protected]
writes:

|e$B0J2<$G%(%i!<$b?t;z$b=PNO$5$l$J$$$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B

|$ ./ruby -ve ‘1.upto 10 {|v| p v }’
|ruby 1.9.0 (2007-12-19 patchlevel 0) [i686-linux]
|$

e$B3N$+$KJQ$G$9!#e(B

|parse.y e$B$K;vee(B cmd_brace_block e$B$r;H$C$F$J$$%k!<%k$,e(B 2 e$B$D$"$j$^$7$?!#e(B
|e$B$3$&$J$C$?$N$Oe(B r10235 e$B$+$i$G!"$=$Ne(B Changelog e$B$Ke(B
|
| * parse.y: remove some obsolete syntax rules (unparenthesized
| method calls in argument list).
|
|e$B$H$"$j$^$7$?!#$*$=$i$/$3$N%k!<%k$O=|5n$5$l$k$Y$-$J$s$G$O$J$$$G$7$g$&$+!#e(B

e$B$`$7$m$A$c$s$H%V%m%C%/$H$7$F3hMQ$7$?J}$,$h$$$N$G$O$J$$$+$H;We(B
e$B$$$^$9!#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