summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorbggd <[email protected]>2013-12-08 21:28:24 +0900
committerbggd <[email protected]>2013-12-08 21:28:24 +0900
commit072871dcc51926c61db91307c0fd16d2b38e92fb (patch)
treef4ddf5b15816d90378ac81a537fd672551f8f2be /src
parentb6cc3aca333b8692909c829be7d69bbc556118b4 (diff)
downloadmruby-072871dcc51926c61db91307c0fd16d2b38e92fb.tar.gz
mruby-072871dcc51926c61db91307c0fd16d2b38e92fb.zip
Fix mod.constants cannot return the single character constant
Diffstat (limited to 'src')
-rw-r--r--src/variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c
index efcda25c5..7ff68cc17 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -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;