{"record":{"id":"177a95d7de989667","repo":"pry/pry","slug":"path-lineno-warning-message","errorCode":null,"errorMessage":"#{path}:#{lineno}: warning: #{message}","messagePattern":"#(.+?):#(.+?): warning: #(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/pry/warning.rb","lineNumber":17,"sourceCode":"# frozen_string_literal: true\n\nclass Pry\n  # @api private\n  # @since v0.13.0\n  module Warning\n    # Prints a warning message with exact file and line location, similar to how\n    # Ruby's -W prints warnings.\n    #\n    # @param [String] message\n    # @return [void]\n    def self.warn(message)\n      location = caller_locations(2..2).first\n      path = location.path\n      lineno = location.lineno\n\n      Kernel.warn(\"#{path}:#{lineno}: warning: #{message}\")\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/pry/pry/blob/135640262879544c6bfecbf3e78511289bfe956c/lib/pry/warning.rb#L1-L21","documentation":"Error \"#{path}:#{lineno}: warning: #{message}\" thrown in pry/pry.","triggerScenarios":"Thrown at lib/pry/warning.rb:17 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"135640262879544c6bfecbf3e78511289bfe956c","analyzedAt":"2026-08-21T19:07:03.985Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}