aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mathn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mathn.rb')
-rw-r--r--lib/mathn.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/mathn.rb b/lib/mathn.rb
index 1c68a4bb03..3e24dd03f3 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