End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
GetoptLong#terminate
terminate
lib/getoptlong.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/getoptlong.rb, line 612
def terminate
return nil if @status == STATUS_TERMINATED
raise RuntimeError, "an error has occurred" if @error != nil
@status = STATUS_TERMINATED
@non_option_arguments.reverse_each do |argument|
ARGV.unshift(argument)
end
@canonical_names = nil
@argument_flags = nil
@rest_singles = nil
@non_option_arguments = nil
return self
end
Terminate option processing; returns nil if processing has already terminated; otherwise returns self.