lib/numb/emrip.rb in numb-0.111.0 vs lib/numb/emrip.rb in numb-0.114.0
- old
+ new
@@ -8,10 +8,8 @@
# 1009.emrip? #=> true
# 1193.emrip? #=> true
# 7.emrip? #=> false
#
def emrip?
- return false unless prime?
- reversed = to_s.reverse.to_i
- reversed != self and reversed.prime?
+ prime? and reverse != self and reverse.prime?
end
end