diff options
| author | skandhas <[email protected]> | 2012-12-09 21:16:58 +0800 |
|---|---|---|
| committer | skandhas <[email protected]> | 2012-12-09 21:16:58 +0800 |
| commit | 0303faf69676d77b76832ef17e17e9e2dbcd2e22 (patch) | |
| tree | 9a6a7c8a343b0900474a15e51fdffa8284a73437 /src | |
| parent | 453980d76ae0ac22dc490612fefcab9cd756950f (diff) | |
| download | mruby-0303faf69676d77b76832ef17e17e9e2dbcd2e22.tar.gz mruby-0303faf69676d77b76832ef17e17e9e2dbcd2e22.zip | |
fix incorrect checkups in check_iv_name
Diffstat (limited to 'src')
| -rw-r--r-- | src/kernel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel.c b/src/kernel.c index 531c6d9d8..85eedc7ba 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -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); } } |
