From 3fdb963827fde7fbe1837763cb834842b8336fee Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 21 Mar 2019 12:35:29 +1300 Subject: [PATCH] [ruby/logger] Prefer require_relative, it's a little bit faster. https://github.com/ruby/logger/commit/1e2aab4bea --- lib/logger.rb | 11 ++++++----- lib/logger/log_device.rb | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/logger.rb b/lib/logger.rb index d6539a6f69..6ea4e8e8dc 100644 --- a/lib/logger.rb +++ b/lib/logger.rb @@ -11,11 +11,12 @@ # A simple system for logging messages. See Logger for more documentation. require 'monitor' -require 'logger/version' -require 'logger/formatter' -require 'logger/log_device' -require 'logger/severity' -require 'logger/errors' + +require_relative 'logger/version' +require_relative 'logger/formatter' +require_relative 'logger/log_device' +require_relative 'logger/severity' +require_relative 'logger/errors' # == Description # diff --git a/lib/logger/log_device.rb b/lib/logger/log_device.rb index 7cfb45b556..d287a470fc 100644 --- a/lib/logger/log_device.rb +++ b/lib/logger/log_device.rb @@ -1,4 +1,4 @@ -require 'logger/period' +require_relative 'period' class Logger # Device used for logging messages.