Skip to content
Browse files

refactor mrb_vm_cv_get

  • Loading branch information...
1 parent 8026ec0 commit e6a47323b8d67fdf85f095c30b2d66a00d2d2ca5 @skandhas skandhas committed Dec 20, 2012
Showing with 2 additions and 11 deletions.
  1. +2 −11 src/variable.c
View
13 src/variable.c
@@ -701,17 +701,8 @@ mrb_vm_cv_get(mrb_state *mrb, mrb_sym sym)
struct RClass *c = mrb->ci->proc->target_class;
if (!c) c = mrb->ci->target_class;
- while (c) {
- if (c->iv) {
- iv_tbl *t = c->iv;
- mrb_value v;
-
- if (iv_get(mrb, t, sym, &v))
- return v;
- }
- c = c->super;
- }
- return mrb_nil_value();
+
+ return mrb_mod_cv_get(mrb, c, sym);
}
void

0 comments on commit e6a4732

Please sign in to comment.
Something went wrong with that request. Please try again.