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

Merge pull request #604 from skandhas/pr-fix-check_iv_name

fix incorrect checkups in check_iv_name
parents 9168d166 0303faf6
...@@ -564,7 +564,7 @@ check_iv_name(mrb_state *mrb, mrb_sym id) ...@@ -564,7 +564,7 @@ check_iv_name(mrb_state *mrb, mrb_sym id)
int len; int len;
s = mrb_sym2name_len(mrb, id, &len); s = mrb_sym2name_len(mrb, id, &len);
if (len < 2 || s[0] != '@') { if (len < 2 || !(s[0] == '@' && s[1] != '@')) {
mrb_name_error(mrb, id, "`%s' is not allowed as an instance variable name", s); mrb_name_error(mrb, id, "`%s' is not allowed as an instance variable name", s);
} }
} }
......
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