diff options
author | David RodrÃguez <[email protected]> | 2024-09-18 19:00:18 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-09-24 15:33:31 +0900 |
commit | 5228d349d98a2cac91503b73710c31125e62c244 () | |
tree | 8dd116541074043e7922116d0ad1c60ad02d2715 /lib/rubygems/basic_specification.rb | |
parent | 5f47f0f759ebac7b4ce6e8d3d68cabba81f7ffbc (diff) |
[rubygems/rubygems] Restore `gem_dir` as an instance variable accessor
I suspect someone could be setting this instance variable, and the previous changes made that no longer effective. Also I implemented a previous TOOD in `full_gem_path` the other way around: > # TODO: This is a heavily used method by gems, so we'll need > # to aleast just alias it to #gem_dir rather than remove it. I made `gem_dir` an alias of `full_gem_path` rather than the opposite. This alternative change keeps both methods symmetric without deprecating either of them for now. https://.com/rubygems/rubygems/commit/28983973a3
-rw-r--r-- | lib/rubygems/basic_specification.rb | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -136,13 +136,13 @@ class Gem::BasicSpecification ## # The full path to the gem (install path + full name). def full_gem_path @full_gem_path ||= find_full_gem_path end - alias_method :gem_dir, :full_gem_path - ## # Returns the full name (name-version) of this Gem. Platform information # is included (name-version-platform) if it is specified and not the @@ -213,6 +213,16 @@ class Gem::BasicSpecification end ## # Returns the full path to the gems directory containing this spec's # gem directory. eg: /usr/local/lib/ruby/1.8/gems |