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

アイディア: block を渡すと警告 #52

Open
ko1 opened this issue Aug 10, 2018 · 2 comments
Open

アイディア: block を渡すと警告 #52

ko1 opened this issue Aug 10, 2018 · 2 comments

Comments

@ko1
Copy link
Owner

ko1 commented Aug 10, 2018

Array#indexは引数とブロック両方渡すとgiven block not usedと警告してくれるけどany?などは警告してくれない

@fursich
Copy link

fursich commented Sep 13, 2018

以前これに起因するバグを踏んだので、

  • Enumerable#any? all? one? none?
  • Hash#any?
  • Array#any?

あたりで使用されないブロックがある場合に警告を出せるようにやってみます。
(アイデアありがとうございます!)

@fursich
Copy link

fursich commented Sep 13, 2018

https://bugs.ruby-lang.org/issues/15113

チケット作ってみました。
色々と教えていただいてありがとうございました! m(_ _)m

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

No branches or pull requests

2 participants