mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
parent
b5e53e2f32
commit
22dab73971
1 changed files with 1 additions and 3 deletions
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "pathname"
|
|
||||||
|
|
||||||
require "rubygems" unless defined?(Gem)
|
require "rubygems" unless defined?(Gem)
|
||||||
|
|
||||||
# We can't let `Gem::Source` be autoloaded in the `Gem::Specification#source`
|
# We can't let `Gem::Source` be autoloaded in the `Gem::Specification#source`
|
||||||
|
@ -47,7 +45,7 @@ module Gem
|
||||||
|
|
||||||
def full_gem_path
|
def full_gem_path
|
||||||
if source.respond_to?(:root)
|
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
|
else
|
||||||
rg_full_gem_path
|
rg_full_gem_path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue