lob-ruby
lob-ruby copied to clipboard
Fix regex warning in bank_account.rb
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.
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?
I created this PR for solving the same https://github.com/lob/lob-ruby/pull/237