Fix mod.constants cannot return the single character constant

This commit is contained in:
bggd
2013-12-08 21:28:24 +09:00
parent b6cc3aca33
commit 072871dcc5
+1 -1
View File
@@ -963,7 +963,7 @@ const_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
ary = *(mrb_value*)p;
s = mrb_sym2name_len(mrb, sym, &len);
if (len > 1 && ISUPPER(s[0])) {
if (len >= 1 && ISUPPER(s[0])) {
mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
}
return 0;