class RuboCop::Cop::Style::RedundantArgument

def exclude_cntrl_character?(target_argument, redundant_argument)

def exclude_cntrl_character?(target_argument, redundant_argument)
  return true unless (target_argument_string = target_argument.to_s).valid_encoding?
  !target_argument_string.sub(/\A'/, '"').sub(/'\z/, '"').match?(/[[:cntrl:]]/) ||
    !redundant_argument.match?(/[[:cntrl:]]/)
end