diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-15 12:05:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-15 12:05:46 +0000 |
commit | d7976d145193379d8c43f33e9a5714292a40d994 (patch) | |
tree | 91b0975cbe29241078aba41607420adeed680a35 /string.c | |
parent | d154bec0d5f0dd32e0d30559ab8a0a7ed8be98d2 (diff) |
Use `&` instead of `modulo`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5421,7 +5421,7 @@ rb_str_setbyte(VALUE str, VALUE index, VALUE value) pos += len; VALUE v = rb_to_int(value); - VALUE w = rb_int_modulo(v, INT2FIX(256)); + VALUE w = rb_int_and(v, INT2FIX(0xff)); unsigned char byte = NUM2INT(w) & 0xFF; if (!str_independent(str)) |