module Prime::MillerRabin::PrimeIntercept

Public Instance Methods

prime?(value, *args) click to toggle source

Intercept the prime? method. By going right to MillerRabin we can produce a faster result.

Calls superclass method
# File lib/prime_miller_rabin.rb, line 137
def prime?(value, *args)
  args.first.instance_of?(Prime::MillerRabin) ? args.first.prime?(value) : super
end