class Sorbet::Private::GemGeneratorTracepoint::TracepointSerializer
def gem_from_location(location)
def gem_from_location(location) match = location&.match(/^.*\/(ruby)\/([\d.]+)\//) || # ruby stdlib location&.match(/^.*\/(j?ruby)-([\d.]+)\//) || # jvm ruby stdlib location&.match(/^.*\/(site_ruby)\/([\d.]+)\//) || # rubygems location&.match(/^.*\/gems\/(?:j?ruby-)?[\d.]+(?:@[^\/]+)?(?:\/bundler)?\/gems\/([^\/]+)-([^-\/]+)\//i) # gem if match.nil? # uncomment to generate files for methods outside of gems # { # path: location, # gem: location.gsub(/[\/\.]/, '_'), # version: '1.0.0', # } nil else { path: match[0], gem: match[1], version: match[2], } end end