Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roo::Base#each_with_pagename returns Enumerator Object #576

Merged

Conversation

tsuchiyaisshin
Copy link
Contributor

@tsuchiyaisshin tsuchiyaisshin commented Dec 27, 2022

Summary

Generally in ruby, when a method named like "each" called without block returns an Enumerator.

@tsuchiyaisshin tsuchiyaisshin force-pushed the feature/return_enumerator_each_with_page branch from 82adc92 to 19d4e8f Compare January 12, 2023 00:39
@tsuchiyaisshin tsuchiyaisshin force-pushed the feature/return_enumerator_each_with_page branch from 19d4e8f to 3d5fdb8 Compare January 19, 2023 02:43
@kakubin kakubin merged commit 20011af into roo-rb:master Jan 20, 2023
@kakubin
Copy link
Contributor

kakubin commented Jan 20, 2023

@tsuchiyaisshin
First time contribution 🎉🎉🎉

@starchcode
Copy link

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| #some stuff end

@starchcode
Copy link

starchcode commented Feb 8, 2023

I added another each so it worked. but isn't it strange?

spreadsheet.each_with_pagename.each do |firstvar, secondvar| #somestuff end

@starchcode
Copy link

@tsuchiyaisshin @kakubin I forgot to mention you guys on this one. please see my comments above

@broksonic21
Copy link

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.

@starchcode
Copy link

@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

@broksonic21
Copy link

@starchcode that rename would make more sense.

@kakubin
Copy link
Contributor

kakubin commented Feb 13, 2023

@starchcode @broksonic21
sorry
this change doesn't fit my intention, so I made fix #584

kakubin added a commit to kakubin/roo that referenced this pull request Sep 12, 2023
patrickkulling added a commit that referenced this pull request Sep 12, 2023
Fix Roo::Base#each_with_pagename degraded at #576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants