From f6c5930db64ff0f3b5ffb7a9d7b77105eb972524 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Wed, 2 Aug 2017 16:06:21 +0200 Subject: [PATCH] Use __dir__ instead of deriving from __FILE__ where suitable --- rackstash.gemspec | 2 +- spec/spec_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rackstash.gemspec b/rackstash.gemspec index 3fd1a69..573270e 100644 --- a/rackstash.gemspec +++ b/rackstash.gemspec @@ -5,7 +5,7 @@ # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE.txt file for details. -lib = File.expand_path('../lib', __FILE__) +lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'rackstash/version' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 57e0df9..e1c56a7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -24,7 +24,7 @@ if ENV['COVERAGE'] end end -$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +$LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'rackstash' RSpec.configure do |config|