summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/string.c b/string.c
index 3026de17d8..5b73d1b962 100644
--- a/string.c
+++ b/string.c
@@ -5710,7 +5710,7 @@ rb_str_each_byte(VALUE str)
static VALUE
rb_str_each_char(VALUE str)
{
- int i, len, n;
+ long i, len, n;
const char *ptr;
rb_encoding *enc;
@@ -5759,7 +5759,8 @@ rb_str_each_char(VALUE str)
static VALUE
rb_str_each_codepoint(VALUE str)
{
- int len, n;
+ long len;
+ int n;
unsigned int c;
const char *ptr, *end;
rb_encoding *enc;