ammar / regexp_parser

A regular expression parser library for Ruby
MIT License
144 stars 23 forks source link

Allow options to be passed when processing a String pattern #68

Closed owst closed 4 years ago

owst commented 4 years ago

@jaynetics as mentioned in https://github.com/rubocop-hq/rubocop/pull/8625#issuecomment-691471124 - please let me know what you think 👍

jaynetics commented 4 years ago

@owst thank you, this looks nice!

the only thing we might want to change is how the passed options are silently ignored when used alongside a Regexp. this seems a little counterintuitive. i'd either let it raise an error, or we can simply override the options from the Regexp if people do try to pass their own options.

@ammar this code uses kwargs, which would mean dropping support for running on 1.9. are you fine with that?

owst commented 4 years ago

@jaynetics yeah, good point; I think raising is best (for now)

owst commented 4 years ago

Hi @jaynetics just checking-in on this, do you have any further thoughts? I'd love to get this merged and for a new version of regexp_parser to be released so I can progress https://github.com/rubocop-hq/rubocop/pull/8625

Thanks!

jaynetics commented 4 years ago

@ammar FYI

i have merged this PR which ends support for Ruby 1.9.x and will update the README accordingly.

i could not find any dependents which seem to require it.

if it turns out you or anyone else really still need such support i suggest we release another version to restore it.

jaynetics commented 4 years ago

@owst released with v1.8.0, thanks again!