Commit 0303faf6 authored by skandhas's avatar skandhas

fix incorrect checkups in check_iv_name

parent 453980d7
......@@ -564,7 +564,7 @@ check_iv_name(mrb_state *mrb, mrb_sym id)
int 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);
}
}
......
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