aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index d511297089..bcd75a229a 100644
--- a/string.c
+++ b/string.c
@@ -4070,7 +4070,7 @@ rb_str_ord(VALUE s)
"expacted a characer, but string of size %d given",
RSTRING(s)->len);
}
- c = RSTRING(s)->ptr[0];
+ c = RSTRING(s)->ptr[0] & 0xff;
return INT2NUM(c);
}
/*