vendor/bundle/ruby/3.0.0/gems/brakeman-5.2.2/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb
##
# Utility method to escape something interpolated.
Utility method to escape something interpolated.
Utility method to escape something interpolated .
def dthing_escape type, lit
    case type
    when :dregx then
      lit.gsub(/(\A|[^\\])\//, '\1\/')
    when :dstr, :dsym then
      lit.dump[1..-2]
    when :dxstr then
      lit.gsub(/`/, '\`')
    else
      raise "unsupported type #{type.inspect}"
    end
  end
def dthing_escape type , lit case type when :dregx then lit . gsub ( / ( \A |[^ \\ ]) \/ / , '\1\/' ) when :dstr , :dsym then lit . dump [ 1 .. - 2 ] when :dxstr then lit . gsub ( / ` / , '\`' ) else raise "unsupported type #{type.inspect}" end end
Utility method to escape something interpolated.
Utility method to escape something interpolated .
# TODO: this needs more testing
type
lit