Skip to content

Commit

Permalink
[rubygems/rubygems] Don't depend on Pathname unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and matzbot committed May 13, 2024
1 parent b5e53e2 commit 22dab73
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/bundler/rubygems_ext.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "pathname"

require "rubygems" unless defined?(Gem)

# We can't let `Gem::Source` be autoloaded in the `Gem::Specification#source`
Expand Down Expand Up @@ -47,7 +45,7 @@ def source

def full_gem_path
if source.respond_to?(:root)
Pathname.new(loaded_from).dirname.expand_path(source.root).to_s
File.expand_path(File.dirname(loaded_from), source.root)
else
rg_full_gem_path
end
Expand Down

0 comments on commit 22dab73

Please sign in to comment.