diff options
author | ayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-23 15:32:19 +0000 |
---|---|---|
committer | ayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-23 15:32:19 +0000 |
commit | 212ea12e3addf10091bd7b6c85f4e11349363f92 (patch) | |
tree | a623a342fd14a59b0855659df0b1bfd675238582 | |
parent | 1fd639393f171099a091b2f13fe9271ea8390d6c (diff) | |
download | ruby-212ea12e3addf10091bd7b6c85f4e11349363f92.tar.gz |
add information of incompatibility about Prime.prime? [Bug #7395]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | lib/prime.rb | 4 |
3 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sat May 24 00:25:34 2014 Ayumu AIZAWA <ayumu.aizawa@gmail.com> + + * NEWS: add information of incompatibility about Prime.prime? + * lib/prime.rb: fix docs. + Fri May 23 21:36:28 2014 Josh Goebel <dreamer3@gmail.com> * net/protocol.rb (using_each_crlf_line): fix SMTP dot-stuffing @@ -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 # |