X7ROOT File Manager
Current Path:
/opt/alt/ruby32/share/rubygems/rubygems/resolver
opt
/
alt
/
ruby32
/
share
/
rubygems
/
rubygems
/
resolver
/
ðŸ“
..
📄
activation_request.rb
(2.9 KB)
ðŸ“
api_set
📄
api_set.rb
(2.84 KB)
📄
api_specification.rb
(2.74 KB)
📄
best_set.rb
(1.62 KB)
📄
composed_set.rb
(1.18 KB)
📄
conflict.rb
(3.25 KB)
📄
current_set.rb
(281 B)
📄
dependency_request.rb
(2.25 KB)
📄
git_set.rb
(2.88 KB)
📄
git_specification.rb
(1.27 KB)
📄
index_set.rb
(1.41 KB)
📄
index_specification.rb
(2.36 KB)
📄
installed_specification.rb
(1.21 KB)
📄
installer_set.rb
(6.34 KB)
📄
local_specification.rb
(806 B)
📄
lock_set.rb
(1.67 KB)
📄
lock_specification.rb
(1.81 KB)
ðŸ“
molinillo
📄
molinillo.rb
(74 B)
📄
requirement_list.rb
(1.34 KB)
📄
set.rb
(1.22 KB)
📄
source_set.rb
(931 B)
📄
spec_specification.rb
(1.33 KB)
📄
specification.rb
(2.66 KB)
📄
stats.rb
(951 B)
📄
vendor_set.rb
(1.91 KB)
📄
vendor_specification.rb
(577 B)
Editing: requirement_list.rb
# frozen_string_literal: true ## # The RequirementList is used to hold the requirements being considered # while resolving a set of gems. # # The RequirementList acts like a queue where the oldest items are removed # first. class Gem::Resolver::RequirementList include Enumerable ## # Creates a new RequirementList. def initialize @exact = [] @list = [] end def initialize_copy(other) # :nodoc: @exact = @exact.dup @list = @list.dup end ## # Adds Resolver::DependencyRequest +req+ to this requirements list. def add(req) if req.requirement.exact? @exact.push req else @list.push req end req end ## # Enumerates requirements in the list def each # :nodoc: return enum_for __method__ unless block_given? @exact.each do |requirement| yield requirement end @list.each do |requirement| yield requirement end end ## # How many elements are in the list def size @exact.size + @list.size end ## # Is the list empty? def empty? @exact.empty? && @list.empty? end ## # Remove the oldest DependencyRequest from the list. def remove return @exact.shift unless @exact.empty? @list.shift end ## # Returns the oldest five entries from the list. def next5 x = @exact[0,5] x + @list[0,5 - x.size] end end
Upload File
Create Folder