diff options
| author | skandhas <[email protected]> | 2012-11-06 10:45:22 +0800 |
|---|---|---|
| committer | skandhas <[email protected]> | 2012-11-06 10:45:22 +0800 |
| commit | 3266b6160ecd44633572beb0323b2cd109a91e66 (patch) | |
| tree | 348d7ba6c5cb64240849dab68784fa2efb9689b2 /src/variable.c | |
| parent | b777850c7856ee069603d8f9dd156c38926c2610 (diff) | |
| download | mruby-3266b6160ecd44633572beb0323b2cd109a91e66.tar.gz mruby-3266b6160ecd44633572beb0323b2cd109a91e66.zip | |
The output of Object#instance_variables contains instance variables and class variables.
Diffstat (limited to 'src/variable.c')
| -rw-r--r-- | src/variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c index 2978637b4..b3b3b3d87 100644 --- a/src/variable.c +++ b/src/variable.c @@ -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; |
