summaryrefslogtreecommitdiff
path: root/lib/rubygems/basic_specification.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-03-22 13:17:33 +0900
committerHiroshi SHIBATA <[email protected]>2023-03-23 17:18:49 +0900
commitbec069b0cae3934bb2caee3aad7fbf587ab95937 ()
treebf83ab29cfb9160c92c696b55cd1375e97e3f9de /lib/rubygems/basic_specification.rb
parent8a364b8512b84530cadfe9f27557fa0306ad9856 (diff)
[rubygems/rubygems] util/rubocop -A --only Style/MultilineMemoization
https://.com/rubygems/rubygems/commit/c1f6e4a97b
Notes: Merged: https://.com/ruby/ruby/pull/7582
-rw-r--r--lib/rubygems/basic_specification.rb18
1 files changed, 7 insertions, 11 deletions
@@ -170,18 +170,14 @@ class Gem::BasicSpecification
def to_fullpath(path)
if activated?
@paths_map ||= {}
- @paths_map[path] ||=
- begin
- fullpath = nil
- suffixes = Gem.suffixes
- if suffixes.find do |suf|
- full_require_paths.find do |dir|
- File.file?(fullpath = "#{dir}/#{path}#{suf}")
- end
- end
- fullpath
- end
end
end
end