Commit 072871dc authored by bggd's avatar bggd

Fix mod.constants cannot return the single character constant

parent b6cc3aca
...@@ -963,7 +963,7 @@ const_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p) ...@@ -963,7 +963,7 @@ const_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
ary = *(mrb_value*)p; ary = *(mrb_value*)p;
s = mrb_sym2name_len(mrb, sym, &len); 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)); mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment