Skip to content

Commit

Permalink
Rename _new → __new
Browse files Browse the repository at this point in the history
With the introduction of internal attributes, we adopted the convention
of using two leading underscores for internal methods.
  • Loading branch information
fxn committed Apr 24, 2023
1 parent 341f19e commit dc32bf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/zeitwerk/gem_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GemLoader < Loader

# @private
# @sig (String, bool) -> Zeitwerk::GemLoader
def self._new(root_file, namespace:, warn_on_extra_files:)
def self.__new(root_file, namespace:, warn_on_extra_files:)
new(root_file, namespace: namespace, warn_on_extra_files: warn_on_extra_files)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/zeitwerk/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def unregister_loader(loader)
# @private
# @sig (String) -> Zeitwerk::Loader
def loader_for_gem(root_file, namespace:, warn_on_extra_files:)
gem_loaders_by_root_file[root_file] ||= GemLoader._new(root_file, namespace: namespace, warn_on_extra_files: warn_on_extra_files)
gem_loaders_by_root_file[root_file] ||= GemLoader.__new(root_file, namespace: namespace, warn_on_extra_files: warn_on_extra_files)
end

# @private
Expand Down

0 comments on commit dc32bf1

Please sign in to comment.