From 432222fae13c29b4696905d7c614bc80f67a6051 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 11 Aug 2016 00:51:05 +0200 Subject: prefer __dir__ over __FILE__ in File.expand_path Thinking .. relative to files is not natural, we are used to think "parent of a directory", and we have __dir__ nowadays. --- activerecord/bin/test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activerecord/bin') diff --git a/activerecord/bin/test b/activerecord/bin/test index 822e303ad8..23add35d45 100755 --- a/activerecord/bin/test +++ b/activerecord/bin/test @@ -1,6 +1,8 @@ #!/usr/bin/env ruby -COMPONENT_ROOT = File.expand_path("../../", __FILE__) + +COMPONENT_ROOT = File.expand_path("..", __dir__) require File.expand_path("../tools/test", COMPONENT_ROOT) + module Minitest def self.plugin_active_record_options(opts, options) opts.separator "" -- cgit v1.2.3