ruby-changes:20548
From: mame <ko1@a...>
Date: Thu, 21 Jul 2011 19:36:03 +0900 (JST)
Subject: [ruby-changes:20548] mame:r32596 (trunk): * node.c (dump_node): add today's knowledge. "init arguments (m)" and
mame 2011-07-21 19:35:52 +0900 (Thu, 21 Jul 2011) New Revision: 32596 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32596 Log: * node.c (dump_node): add today's knowledge. "init arguments (m)" and "init arguments (p)" of compile.c indicates a Ruby code that evaluates multiple assignments that is in method or block parameters: def foo((m1,m2), (m3,m4), *r, (p1,p2), (p3,p4)); end The former (init arguments (m)) evaluates the multiple assignments before rest argument, that are (m1,m2) and (m3,m4). The letter (init arguments (p)) does ones after rest argument, that are (p1,p2) and (p3, p4). Modified files: trunk/ChangeLog trunk/node.c Index: ChangeLog =================================================================== --- ChangeLog (revision 32595) +++ ChangeLog (revision 32596) @@ -1,3 +1,14 @@ +Thu Jul 21 19:27:19 2011 Yusuke Endoh <mame@t...> + + * node.c (dump_node): add today's knowledge. "init arguments (m)" and + "init arguments (p)" of compile.c indicates a Ruby code that + evaluates multiple assignments that is in method or block + parameters: def foo((m1,m2), (m3,m4), *r, (p1,p2), (p3,p4)); end + The former (init arguments (m)) evaluates the multiple assignments + before rest argument, that are (m1,m2) and (m3,m4). The letter + (init arguments (p)) does ones after rest argument, that are + (p1,p2) and (p3, p4). + Thu Jul 21 18:11:07 2011 NARUSE, Yui <naruse@r...> * enum.c (enum_inject): remove empty line to notify rdoc Index: node.c =================================================================== --- node.c (revision 32595) +++ node.c (revision 32596) @@ -866,6 +866,9 @@ else { D_NODE_HEADER(node); ANN("method parameters (cont'd)"); + ANN("\"init arguments (m)\" evaluates multiple assignments before rest argument"); + ANN("\"init arguments (p)\" evaluates multiple assignments after rest argument"); + ANN("example: def foo((m1, m2), *r, (p1, p2))"); F_NODE(nd_1st, "init arguments (m)"); LAST_NODE; F_NODE(nd_2nd, "init arguments (p)"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/