aboutsummaryrefslogtreecommitdiffstats
path: root/ast.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-31 15:00:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-31 15:00:37 +0000
commit67c574736912003c377218153f9d3b9c0c96a17b (patch)
tree558aea841613b06f6913d1ab22942aecc531a317 /ast.c
parent4a6f7633303f2d6eb5ec164dc656cf5d47531960 (diff)
downloadruby-67c574736912003c377218153f9d3b9c0c96a17b.tar.gz
Method reference operator
Introduce the new operator for method reference, `.:`. [Feature #12125] [Feature #13581] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index c3f28eba0b..2ae738f7aa 100644
--- a/ast.c
+++ b/ast.c
@@ -468,6 +468,9 @@ node_children(rb_ast_t *ast, NODE *node)
NEW_CHILD(ast, node->nd_args));
case NODE_VCALL:
return rb_ary_new_from_args(1, ID2SYM(node->nd_mid));
+ case NODE_METHREF:
+ return rb_ary_new_from_args(2, NEW_CHILD(ast, node->nd_recv),
+ ID2SYM(node->nd_mid));
case NODE_SUPER:
return rb_ary_new_from_node_args(ast, 1, node->nd_args);
case NODE_ZSUPER: