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