aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index bfa7330999..e6ae4c41a7 100644
--- a/eval.c
+++ b/eval.c
@@ -1881,6 +1881,7 @@ is_defined(self, node, buf)
goto check_bound;
case NODE_CALL:
+ case NODE_ATTRASGN:
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
val = rb_eval(self, node->nd_recv);
@@ -2742,6 +2743,23 @@ rb_eval(self, n)
rb_eval(self, node->nd_body));
break;
+ case NODE_ATTRASGN:
+ {
+ VALUE recv;
+ int argc; VALUE *argv; /* used in SETUP_ARGS */
+ TMP_PROTECT;
+
+ BEGIN_CALLARGS;
+ recv = rb_eval(self, node->nd_recv);
+ SETUP_ARGS(node->nd_args);
+ END_CALLARGS;
+
+ SET_CURRENT_SOURCE();
+ rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,0);
+ result = argv[argc-1];
+ }
+ break;
+
case NODE_CALL:
{
VALUE recv;