Open Earlopain opened 4 months ago
@koic Does it look good for you? I'm not sure if these warnings are a part of some implicit contract that other libraries might rely on. If not I believe we should merge it.
I've ignored these warnings in RuboCop itself so this is not strictly necessary. If you feel there is some risk associated here then feel free to close (though it would be nice not having to ignore these warnings)
User input can contain arbitrary regexes. Something like
Parser::CurrentRuby.parse("/[\177\01\1778]/")
shows a warning:I'm interested in getting the warning count in the RuboCop test suite down and since it has a few regex cops there are quite a few warnings of that kind as well. They are unactionable, RuboCop instead emulates these warnings by inspecting the ast parsing the regexp with the
regexp_parser
gem.Also noticed the same for floats:
Parser::CurrentRuby.parse("9.9999e999")