mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
The output of Object#instance_variables contains instance variables and class variables.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user