summaryrefslogtreecommitdiff
path: root/lib/rubygems/basic_specification.rb
diff options
context:
space:
mode:
authorVít Ondruch <[email protected]>2019-07-22 14:31:10 +0200
committerHiroshi SHIBATA <[email protected]>2019-07-31 07:47:02 +0800
commita3b784b3a068ddd9a395b8951e9977035eca5066 ()
tree1f88477341eacd8c4b00ae4704441511cc79d2d2 /lib/rubygems/basic_specification.rb
parentd1806bd8da963c597ccd8c0b63ceac4dbe3ff3ae (diff)
[rubygems/rubygems] Move default specifications dir definition out of BasicSpecification.
This was never the right place. The method got there just by evolution, not by design. Move it within default methods, where it suits better. Since this method is presumably used just internally, it should be safe to deprecate it and remove later. https://.com/rubygems/rubygems/commit/0c0dd9458a
-rw-r--r--lib/rubygems/basic_specification.rb11
1 files changed, 9 insertions, 2 deletions
@@ -35,7 +35,14 @@ class Gem::BasicSpecification
end
def self.default_specifications_dir
- File.join(Gem.default_dir, "specifications", "default")
end
##
@@ -84,7 +91,7 @@ class Gem::BasicSpecification
def default_gem?
loaded_from &&
- File.dirname(loaded_from) == self.class.default_specifications_dir
end
##