Case-insensitive regexes shouldn't be replaced with strings in split
> "oneSpLiTtwo".split("split")
=> ["oneSpLiTtwo"]
> "oneSpLiTtwo".split(/split/i)
=> ["one", "two"]
Expected behavior
Don't trigger RedundantSplitRegexpArgument for case-insensitive regexes
Actual behavior
Rubocop triggers RedundantSplitRegexpArgument for case-insensitive regexes
Steps to reproduce the problem
Run rubocop on
content.split(/separator/i)
RuboCop version
-> be rubocop -V
1.10.0 (using Parser 3.0.0.0, rubocop-ast 1.4.1, running on ruby 2.6.5 x86_64-darwin19)
- rubocop-performance 1.10.0
- rubocop-rails 2.9.1