From b203e667c91960b732269b3dd182c422e1a0a74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 17 Sep 2024 19:00:54 +0200 Subject: [PATCH] [rubygems/rubygems] Fix spelling, it's "cannot" rather than "can not" https://github.com/rubygems/rubygems/commit/3434f094a2 --- lib/bundler/cli/add.rb | 2 +- lib/rubygems/specification_policy.rb | 2 +- spec/bundler/commands/add_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bundler/cli/add.rb b/lib/bundler/cli/add.rb index 002d9e1d33..2b300e1783 100644 --- a/lib/bundler/cli/add.rb +++ b/lib/bundler/cli/add.rb @@ -34,7 +34,7 @@ module Bundler end def validate_options! - raise InvalidOption, "You can not specify `--strict` and `--optimistic` at the same time." if options[:strict] && options[:optimistic] + raise InvalidOption, "You cannot specify `--strict` and `--optimistic` at the same time." if options[:strict] && options[:optimistic] # raise error when no gems are specified raise InvalidOption, "Please specify gems to add." if gems.empty? diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb index d7568ddde9..d79ee7df92 100644 --- a/lib/rubygems/specification_policy.rb +++ b/lib/rubygems/specification_policy.rb @@ -307,7 +307,7 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use: elsif !VALID_NAME_PATTERN.match?(name) error "invalid value for attribute name: #{name.dump} can only include letters, numbers, dashes, and underscores" elsif SPECIAL_CHARACTERS.match?(name) - error "invalid value for attribute name: #{name.dump} can not begin with a period, dash, or underscore" + error "invalid value for attribute name: #{name.dump} cannot begin with a period, dash, or underscore" end end diff --git a/spec/bundler/commands/add_spec.rb b/spec/bundler/commands/add_spec.rb index 9eb9c876ca..0a0d4c0046 100644 --- a/spec/bundler/commands/add_spec.rb +++ b/spec/bundler/commands/add_spec.rb @@ -304,7 +304,7 @@ RSpec.describe "bundle add" do it "throws error" do bundle "add 'foo' --strict --optimistic", raise_on_error: false - expect(err).to include("You can not specify `--strict` and `--optimistic` at the same time") + expect(err).to include("You cannot specify `--strict` and `--optimistic` at the same time") end end