1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags

has been already obsolete.  patch by Thomas Enebo.
  [ruby-core:41929][Bug #5847]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-03-12 05:56:57 +00:00
parent a2229db3e8
commit c5feeb9ac1
3 changed files with 11 additions and 14 deletions

View file

@ -1,3 +1,9 @@
Mon Mar 12 14:56:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags
has been already obsolete. patch by Thomas Enebo.
[ruby-core:41929][Bug #5847]
Mon Mar 12 12:44:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c (Init_eval_method): copy basic methods to Exception.

2
node.h
View file

@ -376,7 +376,7 @@ typedef struct RNode {
#define NEW_RESBODY(a,ex,n) NEW_NODE(NODE_RESBODY,n,ex,a)
#define NEW_ENSURE(b,en) NEW_NODE(NODE_ENSURE,b,0,en)
#define NEW_RETURN(s) NEW_NODE(NODE_RETURN,s,0,0)
#define NEW_YIELD(a,s) NEW_NODE(NODE_YIELD,a,0,s)
#define NEW_YIELD(a) NEW_NODE(NODE_YIELD,a,0,0)
#define NEW_LIST(a) NEW_ARRAY(a)
#define NEW_ARRAY(a) NEW_NODE(NODE_ARRAY,a,1,0)
#define NEW_ZARRAY() NEW_NODE(NODE_ZARRAY,0,0,0)

17
parse.y
View file

@ -2745,7 +2745,7 @@ primary : literal
| keyword_yield '(' rparen
{
/*%%%*/
$$ = NEW_YIELD(0, Qfalse);
$$ = NEW_YIELD(0);
/*%
$$ = dispatch1(yield, dispatch1(paren, arg_new()));
%*/
@ -2753,7 +2753,7 @@ primary : literal
| keyword_yield
{
/*%%%*/
$$ = NEW_YIELD(0, Qfalse);
$$ = NEW_YIELD(0);
/*%
$$ = dispatch0(yield0);
%*/
@ -9634,18 +9634,9 @@ ret_args_gen(struct parser_params *parser, NODE *node)
static NODE *
new_yield_gen(struct parser_params *parser, NODE *node)
{
long state = Qtrue;
if (node) no_blockarg(parser, node);
if (node) {
no_blockarg(parser, node);
if (node && nd_type(node) == NODE_SPLAT) {
state = Qtrue;
}
}
else {
state = Qfalse;
}
return NEW_YIELD(node, state);
return NEW_YIELD(node);
}
static NODE*