summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEllen Marie Dash <[email protected]>2024-09-28 17:25:46 -0400
committergit <[email protected]>2024-10-23 20:03:14 +0000
commit65fd8606a9577f9d0726f3b34d4aa8ebb27515f7 ()
tree2cb86f03b767d3fbf15aa08b464135cf893fdfad /lib
parentff749d9956ed8fca9b1b2e419a574dd525b87167 (diff)
[rubygems/rubygems] Add another bail-early condition to suggest_gems_from_name(), with test.
https://.com/rubygems/rubygems/commit/7bb7c0ac2d
-rw-r--r--lib/rubygems/spec_fetcher.rb4
1 files changed, 4 insertions, 0 deletions
@@ -174,6 +174,10 @@ class Gem::SpecFetcher
max = gem_name.size / 2
names = available_specs(type).first.values.flatten(1)
min_length = gem_name.length - max
max_length = gem_name.length + max