File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -625,19 +625,6 @@ def ==(other)
625625 end
626626 end
627627
628- # @overload <=>(other)
629- # @param other [String] A presence string
630- # @return [Integer] Sort alphabetically by presence, then alphabetically by optional_type
631- def <=>( other )
632- raise ArgumentError , "ExtensionPresence is only comparable to other ExtensionPresence classes" unless other . is_a? ( ExtensionPresence )
633-
634- if @presence != other . presence
635- @presence <=> other . presence
636- else
637- @optional_type <=> other . optional_type
638- end
639- end
640-
641628 ######################################################
642629 # Following comparison operators follow these rules:
643630 # - "mandatory" is greater than "optional"
@@ -695,8 +682,12 @@ class ExtensionRequirement
695682 # @return [Array<RequirementSpec>] Set of requirement specifications
696683 def requirement_specs = @requirements
697684
685+ def requirement_specs_to_s
686+ "#{ @requirements . map ( &:to_s ) . join ( ', ' ) } "
687+ end
688+
698689 def to_s
699- "#{ name } #{ @requirements . map ( & :to_s ) . join ( ', ' ) } "
690+ "#{ name } " + requirement_specs_to_s
700691 end
701692
702693 # @return [Extension] The extension that this requirement is for
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ def ext_req_to_adoc(ext_req)
225225 ext = cfg_arch . extension ( ext_req . name )
226226 ret << "* *#{ ext_req . name } * " + ( ext . nil? ? "" : ext . long_name )
227227 ret << "+"
228- ret << "Version #{ ext_req . requirement_specs } "
228+ ret << "Version #{ ext_req . requirement_specs_to_s } "
229229
230230 ret
231231 end
You can’t perform that action at this time.
0 commit comments