Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Commands::SourcesCommand#check_typo_squatting
check_typo_squatting(source)
lib/rubygems/commands/sources_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/commands/sources_command.rb, line 123
def check_typo_squatting(source)
if source.typo_squatting?("rubygems.org")
question = <<-QUESTION.chomp
#{source.uri} is too similar to https://rubygems.org
Do you want to add this source?
QUESTION
terminate_interaction 1 unless options[:force] || ask_yes_no(question)
end
end
No documentation available
See also
#build_source
#config_file_name
#build_new_source
#configured_sources
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0