diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-16 12:00:41 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-17 18:50:55 +0900 |
commit | 4b285e5c6fe690c89ce71e9d68d87976ef2d65e1 (patch) | |
tree | b2896cd9f6b820cee7c1a050068484a003e66fc0 | |
parent | 9ffd73523db3c80237bd26099c9e11f9f6e3a444 (diff) | |
download | ruby-4b285e5c6fe690c89ce71e9d68d87976ef2d65e1.tar.gz |
[rubygems/rubygems] util/rubocop -A --only Layout/AssignmentIndentation
https://github.com/rubygems/rubygems/commit/8e64298989
-rw-r--r-- | lib/rubygems/basic_specification.rb | 32 | ||||
-rw-r--r-- | lib/rubygems/stub_specification.rb | 8 | ||||
-rw-r--r-- | test/rubygems/test_gem_source.rb | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index dcc64e6409..a7b12e3fe0 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -144,15 +144,15 @@ class Gem::BasicSpecification def full_require_paths @full_require_paths ||= - begin - full_paths = raw_require_paths.map do |path| - File.join full_gem_path, path.tap(&Gem::UNTAINT) - end + begin + full_paths = raw_require_paths.map do |path| + File.join full_gem_path, path.tap(&Gem::UNTAINT) + end - full_paths << extension_dir if have_extensions? + full_paths << extension_dir if have_extensions? - full_paths - end + full_paths + end end ## @@ -171,15 +171,15 @@ class Gem::BasicSpecification if activated? @paths_map ||= {} @paths_map[path] ||= - begin - fullpath = nil - suffixes = Gem.suffixes - suffixes.find do |suf| - full_require_paths.find do |dir| - File.file?(fullpath = "#{dir}/#{path}#{suf}") - end - end ? fullpath : nil - end + begin + fullpath = nil + suffixes = Gem.suffixes + suffixes.find do |suf| + full_require_paths.find do |dir| + File.file?(fullpath = "#{dir}/#{path}#{suf}") + end + end ? fullpath : nil + end else nil end diff --git a/lib/rubygems/stub_specification.rb b/lib/rubygems/stub_specification.rb index d87abdd993..4682cc94fd 100644 --- a/lib/rubygems/stub_specification.rb +++ b/lib/rubygems/stub_specification.rb @@ -84,10 +84,10 @@ class Gem::StubSpecification < Gem::BasicSpecification def activated? @activated ||= - begin - loaded = Gem.loaded_specs[name] - loaded && loaded.version == version - end + begin + loaded = Gem.loaded_specs[name] + loaded && loaded.version == version + end end def default_gem? diff --git a/test/rubygems/test_gem_source.rb b/test/rubygems/test_gem_source.rb index 5a6c9ffc94..af39303085 100644 --- a/test/rubygems/test_gem_source.rb +++ b/test/rubygems/test_gem_source.rb @@ -164,7 +164,7 @@ class TestGemSource < Gem::TestCase latest_specs << Gem::NameTuple.new("fixed", Gem::Version.new("1.0.0"), "ruby") # Setup valid data on the 'remote' @fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}.gz"] = - util_gzip(Marshal.dump(latest_specs)) + util_gzip(Marshal.dump(latest_specs)) cache_dir = File.join Gem.spec_cache_dir, "gems.example.com%80" |