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. --- activesupport/bin/test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activesupport/bin') diff --git a/activesupport/bin/test b/activesupport/bin/test index 404cabba51..84a05bba08 100755 --- a/activesupport/bin/test +++ b/activesupport/bin/test @@ -1,4 +1,6 @@ #!/usr/bin/env ruby -COMPONENT_ROOT = File.expand_path("../../", __FILE__) + +COMPONENT_ROOT = File.expand_path("..", __dir__) require File.expand_path("../tools/test", COMPONENT_ROOT) + exit Minitest.run(ARGV) -- cgit v1.2.3