Skip to content
Commit 6909ea77 authored by Lukas Krause's avatar Lukas Krause
Browse files

Fix regex match group handling after moving to case statements

The rubocop autocorrect for Style/CaseLikeIf does not take into
account the match operator for regex, which in this case
returns the matched data when using it with and if/elsif statement.
After just moving this to an case statement, the data is not returned
anymore.
This could be fixed by using the `$LAST_MATCH_INFO` pseudo variable which
contains the whole `MatchData` object of the latest regex matching group.
parent 1de2cc9c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment