Closed tsuchiyaisshin closed 1 year ago
@tsuchiyaisshin First time contribution 🎉🎉🎉
How does it change the way we use each_with_pagename? this doesn't work in my project anymore
`spreadsheet.each_with_pagename do |firstvar, secondvar|
end`
I added another each
so it worked. but isn't it strange?
spreadsheet.each_with_pagename.each do |firstvar, secondvar| #somestuff end
@tsuchiyaisshin @kakubin I forgot to mention you guys on this one. please see my comments above
Seconding @starchcode here. This feels non-standard to me, and surprised us when upgrading. Adding the extra each
does work, but is counterintuitive. I definitely suggesting rolling this one back.
@broksonic21 one way would be to change the name of the function from each_with_pagename
to something like pages
or anything that makes the most sense this way appending and extra each wouldn't sound strange. Unless there are better ways to work it out
@starchcode that rename would make more sense.
@starchcode @broksonic21 sorry this change doesn't fit my intention, so I made fix https://github.com/roo-rb/roo/pull/584
Summary
Generally in ruby, when a method named like "each" called without block returns an Enumerator.