diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-04-09 09:14:02 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-04-09 09:14:02 +0900 |
commit | 1a4f33e84e0633e8f953ee3cb06b42dcc952444a (patch) | |
tree | 18017ab2feae6b29c135286ec8a2037f50e7b00b /numeric.c | |
parent | cdd613b2997944cd0d82f8d41071440779c19a99 (diff) |
numeric.c: Remove unreachable code
b cannot be <= 0 here. Found by Coverity Scan
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -4079,10 +4079,7 @@ fix_pow(VALUE x, VALUE y) if (b == 0) return INT2FIX(1); if (b == 1) return x; - if (a == 0) { - if (b > 0) return INT2FIX(0); - return DBL2NUM(HUGE_VAL); - } + if (a == 0) return INT2FIX(0); return int_pow(a, b); } else if (RB_TYPE_P(y, T_BIGNUM)) { |