diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-01 13:10:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-01 13:10:14 +0000 |
commit | 69fc155c7743d83dec2fc6b80a9eb2e6414cb10b (patch) | |
tree | f61af440a27902fb8d3a52ca52958f2b0c44e98e /numeric.c | |
parent | cbfe54c5609584c9c895262df6a7a58d675473ba (diff) |
numeric.c: use rb_num_coerce_bit
* numeric.c (int_and, int_or, int_xor): use rb_num_coerce_bit to
reduce repeated code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -4168,8 +4168,7 @@ fix_and(VALUE x, VALUE y) return rb_big_and(y, x); } - bit_coerce(&x, &y); - return num_funcall1(x, '&', y); + return rb_num_coerce_bit(x, y, '&'); } static VALUE @@ -4204,8 +4203,7 @@ fix_or(VALUE x, VALUE y) return rb_big_or(y, x); } - bit_coerce(&x, &y); - return num_funcall1(x, '|', y); + return rb_num_coerce_bit(x, y, '|'); } static VALUE @@ -4240,8 +4238,7 @@ fix_xor(VALUE x, VALUE y) return rb_big_xor(y, x); } - bit_coerce(&x, &y); - return num_funcall1(x, '^', y); + return rb_num_coerce_bit(x, y, '^'); } static VALUE |