Issue #11606 has been updated by Marc-Andre Lafortune.


Totally agree. I hope you'll find my fix acceptable.
Thanks for creating the issue

----------------------------------------
Bug #11606: Prime.prime? should throw error on invalid inputs
https://bugs.ruby-lang.org/issues/11606#change-54490

* Author: NagaChaitanya Vellanki
* Status: Closed
* 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/