From: nagachaitanya.vellanki@... Date: 2015-10-19T21:46:09+00:00 Subject: [ruby-core:71120] [Ruby trunk - Bug #11606] [Open] Prime.prime? should throw error on invalid inputs Issue #11606 has been reported by NagaChaitanya Vellanki. ---------------------------------------- Bug #11606: Prime.prime? should throw error on invalid inputs https://bugs.ruby-lang.org/issues/11606 * Author: NagaChaitanya Vellanki * Status: Open * Priority: Normal * Assignee: NagaChaitanya Vellanki * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- irb(main):003:0> Prime.prime?(1,3) => false irb(main):004:0> Prime.prime?(1.3) => false irb(main):005:0> Prime.prime?(20.3) => true Prime.prime? converts floating point numbers to integer to determine if they are prime. A prime by definition is a integer > 1. Will include a patch for this. -- https://bugs.ruby-lang.org/