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

enum_forに引数を渡していなかったら怒るCop #29

Closed
pocke opened this issue Feb 23, 2020 · 1 comment
Closed

enum_forに引数を渡していなかったら怒るCop #29

pocke opened this issue Feb 23, 2020 · 1 comment

Comments

@pocke
Copy link
Owner

pocke commented Feb 23, 2020

def each(opts = {})
  return enum_for(__method__) unless block_given?

  # ...
end

みたいな定型句enum_forを呼んでいる時に、メソッドの引数を渡していないのを怒りたい。
定型句じゃない時には怒らなくても良さそう

@pocke
Copy link
Owner Author

pocke commented Feb 25, 2020

issued rubocop/rubocop#7753

@pocke pocke closed this as completed Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant