diff --git a/ChangeLog b/ChangeLog index f6a9c0715e..6e9d2ef6ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat May 24 00:25:34 2014 Ayumu AIZAWA + + * NEWS: add information of incompatibility about Prime.prime? + * lib/prime.rb: fix docs. + Fri May 23 21:36:28 2014 Josh Goebel * net/protocol.rb (using_each_crlf_line): fix SMTP dot-stuffing diff --git a/NEWS b/NEWS index 8bc0625f8a..d6a97dabda 100644 --- a/NEWS +++ b/NEWS @@ -111,6 +111,11 @@ with all sufficient information, see the ChangeLog file. * Removed because it conflicts to minitest 5, and it was just an wrapper of minitest 4. [Feature #9711] +* Prime + * incompatible changes: + * Prime.prime? now returns false for negative numbers. This method + should not be used to know the number is composite or not. [Bug #7395] + === Built-in global variables compatibility issues === C API updates diff --git a/lib/prime.rb b/lib/prime.rb index 6d3936e317..4b14a221f7 100644 --- a/lib/prime.rb +++ b/lib/prime.rb @@ -29,7 +29,7 @@ class Integer Prime.prime_division(self, generator) end - # Returns true if +self+ is a prime number, false for a composite. + # Returns true if +self+ is a prime number, else returns false. def prime? Prime.prime?(self) end @@ -150,7 +150,7 @@ class Prime end - # Returns true if +value+ is prime, false for a composite. + # Returns true if +value+ is prime number, else returns false. # # == Parameters #