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 c6e43fd212..ac87b8d68f 100644
--- a/string.c
+++ b/string.c
@@ -4416,7 +4416,7 @@ rb_str_sum(argc, argv, str)
ptr = p = RSTRING(str)->ptr;
len = RSTRING(str)->len;
pend = p + len;
- if (bits > sizeof(long)*CHAR_BIT) {
+ if (bits >= sizeof(long)*CHAR_BIT) {
VALUE sum = INT2FIX(0);
while (p < pend) {