Commit d1a453a8 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

wrong condition for iv name check

parent f1149166
......@@ -552,7 +552,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] != '@') {
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