End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Command#begins?
begins?(long, short)
lib/rubygems/command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/command.rb, line 136
def begins?(long, short)
return false if short.nil?
long[0, short.length] == short
end
True if long begins with the characters from short.
See also
#arguments
#check_deprecated_options
#add_parser_run_info
#configure_options
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0