Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove dead code from Fixnum::pow

This removes dead code since we already check exp < 0 and exp == 0
before running this code.
  • Loading branch information...
commit fe23f6d975da95e56040b956bd953f6be3a7601c 1 parent b3e58d2
@dbussink dbussink authored
Showing with 1 addition and 8 deletions.
  1. +1 −8 vm/builtin/fixnum.cpp
View
9 vm/builtin/fixnum.cpp
@@ -186,14 +186,7 @@ namespace rubinius {
if(exp == 0) return Fixnum::from(1);
if(base == 1) return this;
- if(base == 0) {
- if(exp > 0) return Fixnum::from(0);
- return Float::create(state, INFINITY);
- }
-
- if(exp < 0) {
- return this->to_f(state)->fpow(state, exponent);
- }
+ if(base == 0) return Fixnum::from(0);
native_int result = 1;
Please sign in to comment.
Something went wrong with that request. Please try again.