aboutsummaryrefslogtreecommitdiffstats
path: root/lib/roo/base.rb
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-11-26 19:02:28 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2025-11-26 19:02:28 -0500
commitc62f8376a13e7a4f493167aba1c66a9201fc59c6 (patch)
treed58492f972be02c406d26620004e1ffe2086fbc7 /lib/roo/base.rb
parentae103e148eb3c15606b816505492d870ef062ad3 (diff)
New upstream version 3.0.0.upstream/3.0.0upstream
Diffstat (limited to 'lib/roo/base.rb')
-rw-r--r--lib/roo/base.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/roo/base.rb b/lib/roo/base.rb
index 91c8d1c..80b495e 100644
--- a/lib/roo/base.rb
+++ b/lib/roo/base.rb
@@ -250,10 +250,10 @@ class Roo::Base
# iterate through all worksheets of a document
def each_with_pagename
- Enumerator.new do |yielder|
- sheets.each do |s|
- yielder << sheet(s, true)
- end
+ return to_enum(:each_with_pagename) { sheets.size } unless block_given?
+
+ sheets.each do |s|
+ yield sheet(s, true)
end
end