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 String#sub(Regex, NamedTuple) #3824

Merged
merged 1 commit into from Jan 4, 2017

Conversation

maiha
Copy link
Contributor

@maiha maiha commented Jan 2, 2017

String#sub(Regex, NamedTuple) has gone before I knew it.

Sija added a commit to Sija/crystal that referenced this pull request Jan 4, 2017
asterite pushed a commit that referenced this pull request Jan 4, 2017
@maiha
Copy link
Contributor Author

maiha commented Jan 4, 2017

Updated and pushed -f after merging #3833.
It has almost resolved this issue in proper way! :)
Thanks Sija!

sub(pattern) { |match|
if hash.has_key?(match)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps opening new PR adding NamedTuple#has_key?(key : String) overload would be a better idea than using NamedTuple#[]? here?

@asterite
Copy link
Member

asterite commented Jan 4, 2017

Thank you!

@asterite asterite added this to the 0.20.4 milestone Jan 4, 2017
@asterite asterite merged commit 4fbab30 into crystal-lang:master Jan 4, 2017
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

3 participants