diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-09 13:10:31 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-09 13:10:31 +0000 |
commit | a5684950c20286e38c15bae1322bf67af82aefcd (patch) | |
tree | 03518fd3e8288bb044ac408d6b7edf9a3334bbee /lib | |
parent | bdfd99116a97f8af40718766673762498669e1b3 (diff) | |
download | ruby-a5684950c20286e38c15bae1322bf67af82aefcd.tar.gz ruby-a5684950c20286e38c15bae1322bf67af82aefcd.tar.xz ruby-a5684950c20286e38c15bae1322bf67af82aefcd.zip |
* lib/mathn.rb (Prime#each): returns an enumerator if no block
given. [ruby-dev:32815]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mathn.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/mathn.rb b/lib/mathn.rb index 1c68a4bb0..3e24dd03f 100644 --- a/lib/mathn.rb +++ b/lib/mathn.rb @@ -101,6 +101,7 @@ class Prime alias next succ def each + return to_enum(:each) unless block_given? loop do yield succ end |