summaryrefslogtreecommitdiff
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-02 11:34:19 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-02 11:34:19 +0000
commit19ddfc2483bb82cfb241a58d4b25956f7b79d1ad (patch)
treec5eecb286e12abe5d5201d4fe2c6bee9efdf5a31 /vm_insnhelper.h
parent319088e9c7ae9836efd242592ea80c9794a45002 (diff)
* eval.c (rb_mod_using): new method Module#using. [experimental]
* eval.c (rb_mod_refine): new method Module#refine. [experimental] * eval.c (f_using): new method Kernel#using. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r--vm_insnhelper.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index fdaa818e6c..d78a84c3dc 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -160,8 +160,17 @@ enum vm_regan_acttype {
/* deal with control flow 2: method/iterator */
/**********************************************************/
+#define COPY_CREF_OMOD(c1, c2) do { \
+ (c1)->nd_omod = (c2)->nd_omod; \
+ if (!NIL_P((c2)->nd_omod)) { \
+ (c1)->flags |= NODE_FL_CREF_OMOD_SHARED; \
+ (c2)->flags |= NODE_FL_CREF_OMOD_SHARED; \
+ } \
+} while (0)
+
#define COPY_CREF(c1, c2) do { \
NODE *__tmp_c2 = (c2); \
+ COPY_CREF_OMOD(c1, __tmp_c2); \
(c1)->nd_clss = __tmp_c2->nd_clss; \
(c1)->nd_visi = __tmp_c2->nd_visi;\
(c1)->nd_next = __tmp_c2->nd_next; \