From 765a19ab593b481f262a07be5d88484f820da3c2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 2 Jul 2023 00:19:01 +0900 Subject: [ruby/psych] Remove private methods unused since #487 https://github.com/ruby/psych/commit/902c292f26 --- ext/psych/lib/psych.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ext/psych/lib/psych.rb b/ext/psych/lib/psych.rb index 4a2ab58514..9e21325cff 100644 --- a/ext/psych/lib/psych.rb +++ b/ext/psych/lib/psych.rb @@ -694,21 +694,6 @@ module Psych dump_tags[klass] = tag end - # Workaround for emulating `warn '...', uplevel: 1` in Ruby 2.4 or lower. - def self.warn_with_uplevel(message, uplevel: 1) - at = parse_caller(caller[uplevel]).join(':') - warn "#{at}: #{message}" - end - - def self.parse_caller(at) - if /^(.+?):(\d+)(?::in `.*')?/ =~ at - file = $1 - line = $2.to_i - [file, line] - end - end - private_class_method :warn_with_uplevel, :parse_caller - class << self if defined?(Ractor) require 'forwardable' -- cgit v1.2.3