mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
wrong condition for iv name check
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user