diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-15 21:19:48 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-03-15 21:19:48 +0900 |
| commit | a1e12011486576dc2e52fe8da11ef377311fe311 (patch) | |
| tree | 03585abea2e64342eb34c4ae35050259df6b0af0 /src/class.c | |
| parent | 298807fa4e6550958de9cd77e1fa12dfd9a399e4 (diff) | |
| parent | 16b1b2978e4f4d838f3d12e7221139a92429603b (diff) | |
| download | mruby-a1e12011486576dc2e52fe8da11ef377311fe311.tar.gz mruby-a1e12011486576dc2e52fe8da11ef377311fe311.zip | |
Merge pull request #4328 from shuujii/fix-constant-name-validation
Fix constant name validation
Diffstat (limited to 'src/class.c')
| -rw-r--r-- | src/class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class.c b/src/class.c index 9d6fd631f..da95f5c22 100644 --- a/src/class.c +++ b/src/class.c @@ -1898,7 +1898,7 @@ mrb_mod_undef(mrb_state *mrb, mrb_value mod) static mrb_bool const_name_p(mrb_state *mrb, const char *name, mrb_int len) { - return len > 0 && ISUPPER(name[0]); + return len > 0 && ISUPPER(name[0]) && mrb_ident_p(name+1, len-1); } static void |
