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

Remove Enumerable#grep #9711

Merged
merged 1 commit into from
Sep 4, 2020
Merged

Conversation

j8r
Copy link
Contributor

@j8r j8r commented Aug 30, 2020

The commit deprecating Enumerable#grep 7a86e8c date from 9 months, released in Crystal 0.32.0.

@asterite
Copy link
Member

I still prefer grep over select for this (because of this)

@bcardiff
Copy link
Member

I prefer filter over select 🙊

Since it was already marked as deprecated in 0.32:

  • Either we allow select and grep to be alias (dropping the deprecated annotation)
  • Or we drop grep at this point (as this PR does)

@j8r
Copy link
Contributor Author

j8r commented Aug 31, 2020

Agree, it is more an issue with #select, which can be ambiguous, than #grep, which is not ideal either (not a verb, nor on-par with the command).

Copy link
Member

@asterite asterite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's okay because it was deprecated...

@baweaver
Copy link

baweaver commented Sep 1, 2020

FYI: https://bugs.ruby-lang.org/issues/17140

Trying to get discussion on merging these two behaviors in Ruby itself.

@asterite
Copy link
Member

asterite commented Sep 1, 2020

@baweaver Cool! But what's { 'and', 'the', 'of' } in Ruby in your second example?

@baweaver
Copy link

baweaver commented Sep 1, 2020

Ah, right, sorry. It's a new Set literal in Ruby for 3.x: https://bugs.ruby-lang.org/issues/16989

@asterite asterite merged commit e6498c4 into crystal-lang:master Sep 4, 2020
@j8r j8r deleted the remove-enumerable-grep branch September 4, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants