Method: RuboCop::Cop::Lint::MixedCaseRange#each_unsafe_regexp_range
- Defined in:
- lib/rubocop/cop/lint/mixed_case_range.rb
#each_unsafe_regexp_range(node) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rubocop/cop/lint/mixed_case_range.rb', line 55 def each_unsafe_regexp_range(node) node.parsed_tree&.each_expression do |expr| next if skip_expression?(expr) range_pairs(expr).reject do |range_start, range_end| next if skip_range?(range_start, range_end) next unless unsafe_range?(range_start.text, range_end.text) yield(build_source_range(range_start, range_end)) end end end |