Skip to content

Commit

Permalink
* node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack. This …
Browse files Browse the repository at this point in the history
…is a preparation for keyword argument (see [ruby-core:40290]).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
mame committed Dec 26, 2011
1 parent 68fde44 commit 90b1afa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Mon Dec 26 20:59:51 2011 Yusuke Endoh <[email protected]>

* node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack.
This is a preparation for keyword argument (see [ruby-core:40290]).

Mon Dec 26 22:01:19 2011 Hiroshi Shirosaki <[email protected]>

* io.c (rb_sys_fail_path): move the definition.
Expand Down
2 changes: 1 addition & 1 deletion node.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ typedef struct RNode {
#define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
#define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
#define NEW_ITER(a,b) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b),0)
#define NEW_LAMBDA(a) NEW_NODE(NODE_LAMBDA,a,0,0)
#define NEW_LAMBDA(a,b) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b),0)
#define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
#define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
#define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)
Expand Down
7 changes: 3 additions & 4 deletions parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -3551,8 +3551,7 @@ lambda : {
{
lpar_beg = $<num>2;
/*%%%*/
$$ = $3;
$$->nd_body = NEW_SCOPE($3->nd_head, $4);
$$ = NEW_LAMBDA($3, $4);
/*%
$$ = dispatch2(lambda, $3, $4);
%*/
Expand All @@ -3563,15 +3562,15 @@ lambda : {
f_larglist : '(' f_args opt_bv_decl rparen
{
/*%%%*/
$$ = NEW_LAMBDA($2);
$$ = $2;
/*%
$$ = dispatch1(paren, $2);
%*/
}
| f_args
{
/*%%%*/
$$ = NEW_LAMBDA($1);
$$ = $1;
/*%
$$ = $1;
%*/
Expand Down

0 comments on commit 90b1afa

Please sign in to comment.