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

Add #select, #reject and #compact methods to Sinatra::IndifferentHash #1711

Merged
merged 1 commit into from
Aug 17, 2021
Merged

Add #select, #reject and #compact methods to Sinatra::IndifferentHash #1711

merged 1 commit into from
Aug 17, 2021

Conversation

ob-stripe
Copy link
Contributor

This PR adds #select, #reject and #compact methods to Sinatra::IndifferentHash.

This allows the following code to work:

foo_strings = params[:foo].select {|_, v| v.is_a?(String)}

if foo_strings[:bar]
  ...

Without this PR, the code above would fail because select returns a regular Hash with string keys.

@jkowens
Copy link
Member

jkowens commented Aug 17, 2021

Looks good, thanks!

@jkowens jkowens merged commit 7092f0e into sinatra:master Aug 17, 2021
@ob-stripe
Copy link
Contributor Author

Thank you! Do you know if a release is planned sometimes soon?

@jkowens
Copy link
Member

jkowens commented Aug 17, 2021

Honestly, I don't know. I don't have the ability to cut a release. Maybe @namusyaka or @zzak could weigh in on that?

@zzak
Copy link
Member

zzak commented Aug 23, 2021

Personally I have no plans to release soon, please ping me if there's something urgent we should do. 🙇

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.

3 participants