# File lib/rr/deprecations.rb, line 69 def self.show_warning(msg, options = {}) start_backtrace_at_frame = options.fetch(:start_backtrace_at_frame, 2) backtrace = caller(start_backtrace_at_frame) lines = [] lines << ('-' * 80) lines << 'Warning from RR:' lines.concat msg.split(/\n/).map {|l| " #{l}" } lines << "" lines << "Called from:" lines.concat backtrace[0..2].map {|l| " - #{l}" } lines << ('-' * 80) Kernel.warn lines.join("\n") end