Class: Node::ARGSPUSH
- Defined in:
- ext/internal/node/nodeinfo.c,
ext/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.4/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.4/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.5/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.5/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.6/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.6/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.7/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.7/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.1/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.1/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.2/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.2/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.3/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.3/internal/node/nodeinfo.c
Overview
Represents the splat portion of the index in an expression:
obj[arg, arg, *head] = body
Evaluates head to create an array. Evaluates body and pushes the result onto the end of the array, which will then be used to form the arguments of the method call.
Class Method Summary collapse
-
.members ⇒ Array
Return an array of strings containing the names of the node class’s members.
Instance Method Summary collapse
-
#body ⇒ Object
Return the Node’s body member.
-
#head ⇒ Object
Return the Node’s head member.
Methods inherited from Node
#[], #_dump, _load, #address, #bytecode_compile, compile_string, #eval, #flags, #inspect, #members, #nd_file, #nd_line, #nd_type, #obfusc, #pretty_print, #swap, #to_a, #tree, type
Class Method Details
.members ⇒ Array
Return an array of strings containing the names of the node class’s members.
2793 2794 2795 2796 |
# File 'ext/internal/node/nodeinfo.c', line 2793
VALUE node_s_members(VALUE klass)
{
return rb_iv_get(klass, "__member__");
}
|
Instance Method Details
#body ⇒ Object
Return the Node’s body member. The return type is either a Node or an Object.
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 |
# File 'ext/internal/node/nodeinfo.c', line 2076
static VALUE node_body(VALUE self)
{
NODE * n;
Data_Get_Struct(self, NODE, n);
if(TYPE(n->nd_body) == T_NODE)
{
if(0 && nd_type(n) == NODE_OP_ASGN2)
{
return wrap_node_as(
(NODE *)n->nd_body,
rb_cNodeSubclass[NODE_OP_ASGN2_ARG]);
}
else
{
return wrap_node((NODE *)n->nd_body);
}
}
else
{
return (VALUE)n->nd_body;
}
}
|
#head ⇒ Object
Return the Node’s head member. The return type is either a Node or an Object.
2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 |
# File 'ext/internal/node/nodeinfo.c', line 2335
static VALUE node_head(VALUE self)
{
NODE * n;
Data_Get_Struct(self, NODE, n);
if(TYPE(n->nd_head) == T_NODE)
{
if(0 && nd_type(n) == NODE_OP_ASGN2)
{
return wrap_node_as(
(NODE *)n->nd_head,
rb_cNodeSubclass[NODE_OP_ASGN2_ARG]);
}
else
{
return wrap_node((NODE *)n->nd_head);
}
}
else
{
return (VALUE)n->nd_head;
}
}
|