Skip to content

Commit

Permalink
use __dir__ expansion instead of __FILE__
Browse files Browse the repository at this point in the history
  • Loading branch information
glaszig committed May 14, 2024
1 parent 8afe92f commit 9b6385b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ice_cube/i18n.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "ice_cube/null_i18n"

module IceCube
LOCALES_PATH = File.expand_path(File.join("..", "..", "..", "config", "locales"), __FILE__)
LOCALES_PATH = File.expand_path(File.join("..", "..", "config", "locales"), __dir__)

I18n = begin
require "i18n"
Expand Down
2 changes: 1 addition & 1 deletion spec/support/i18n.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
I18n.load_path += Dir[File.expand_path("../../locales/*.yml", __FILE__)]
I18n.load_path += Dir[File.expand_path("../locales/*.yml", __dir__)]

0 comments on commit 9b6385b

Please sign in to comment.