lob-ruby icon indicating copy to clipboard operation
lob-ruby copied to clipboard

Fix regex warning in bank_account.rb

Open arich opened this issue 1 year ago • 2 comments

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

arich avatar Nov 21 '23 00:11 arich

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?

shayani avatar Jan 05 '24 10:01 shayani

I created this PR for solving the same https://github.com/lob/lob-ruby/pull/237

mrkaspa avatar Apr 25 '24 19:04 mrkaspa