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 unused codes #162

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

willnet
Copy link
Contributor

@willnet willnet commented Feb 1, 2024

Now that we support Ruby 2.7 and above, we can remove conditions with versions lower than that.

Now that we support Ruby 2.7 and above, we can remove conditions with versions lower than that.
@zzak
Copy link

zzak commented Aug 27, 2024

Found this too:

# match? method is good performance.
# So when we drop ruby 2.3 support we use match? method because this method add ruby 2.4
#return [value, nil] if value.match?(URI::MailTo::EMAIL_REGEXP)
return [value, nil] if value.match(URI::MailTo::EMAIL_REGEXP)

`String#match?` is more suitable when only a boolean is needed, as it is faster than `String#match`. OpenapiParser now supports Ruby2.7 and above, and since `String#match?` has been available since Ruby2.4, it’s appropriate to make this switch.
@willnet
Copy link
Contributor Author

willnet commented Aug 29, 2024

@zzak Thank you for pointing it out 👍

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.

2 participants