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

Fix regex warning in bank_account.rb #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arich
Copy link

@arich arich commented Nov 21, 2023

Hi!

I'm getting this error when including this gem in my Rails project.

/Users/arich/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/bundler/gems/lob-ruby/lib/openapi_client/models/bank_account.rb: warning: character class has '-' without escape

Most of the changes here are just consolidating the multiple definitions of the same long regex to a single method. I can undo that if it's not helpful.

The change in detail:
Before:
[a-zA-Z0-9-_]+/

After:
[a-zA-Z0-9\-_]+/

We're just escaping the - as a character you want to include in this regex.

image

@shayani
Copy link

shayani commented Jan 5, 2024

That would be nice. I'm getting tired of seeing this warning every time I run anything on my Rails project.

Is there a way to do not display the warning until this PR is merged?

@mrkaspa
Copy link
Contributor

mrkaspa commented Apr 25, 2024

I created this PR for solving the same #237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants