Commit f35d797e authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #530 from skandhas/pr_fix_instance_variables_result_contain_ivar_and_cvar

The output of Kernel#instance_variables contains instance variables and ...
parents 5a82f65a 3266b616
......@@ -580,7 +580,7 @@ iv_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
ary = *(mrb_value*)p;
s = mrb_sym2name_len(mrb, sym, &len);
if (len > 1 && s[0] == '@') {
if (len > 1 && s[0] == '@' && s[1] != '@') {
mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment