diff options
| author | Jun Hiroe <[email protected]> | 2014-04-26 11:44:10 +0900 |
|---|---|---|
| committer | Jun Hiroe <[email protected]> | 2014-04-26 11:52:45 +0900 |
| commit | 68ce209f7ef1352c80544b19a8072b04688555b7 (patch) | |
| tree | fb6067e8e53479ec4993d84afa2188daa3d0f53e /src/numeric.c | |
| parent | 8916381dbaf9199603d834ea27b889c836d0e060 (diff) | |
| download | mruby-68ce209f7ef1352c80544b19a8072b04688555b7.tar.gz mruby-68ce209f7ef1352c80544b19a8072b04688555b7.zip | |
Refactor fix_xor()
Diffstat (limited to 'src/numeric.c')
| -rw-r--r-- | src/numeric.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/numeric.c b/src/numeric.c index 86c48523e..ef7b5fc82 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -953,13 +953,11 @@ static mrb_value fix_xor(mrb_state *mrb, mrb_value x) { mrb_value y; - mrb_int val; mrb_get_args(mrb, "o", &y); y = bit_coerce(mrb, y); - val = mrb_fixnum(x) ^ mrb_fixnum(y); - return mrb_fixnum_value(val); + return mrb_fixnum_value(mrb_fixnum(x) ^ mrb_fixnum(y)); } #define NUMERIC_SHIFT_WIDTH_MAX (MRB_INT_BIT-1) |
