diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-12 09:09:23 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-12 10:49:43 +0900 |
commit | bbe56a643734025aef6a3cbeb07c5306505040f6 (patch) | |
tree | c6980a39ce6571c032695702bd974431eee4d516 /lib/bundler/dsl.rb | |
parent | f1cdc129d4d6440168b840fa852fa6c3e28d46a9 (diff) | |
download | ruby-bbe56a643734025aef6a3cbeb07c5306505040f6.tar.gz |
Merge RubyGems/Bundler master
from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 547db16190..179fea4dfd 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -324,7 +324,7 @@ module Bundler if name.is_a?(Symbol) raise GemfileError, %(You need to specify gem names as Strings. Use 'gem "#{name}"' instead) end - if name =~ /\s/ + if /\s/.match?(name) raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace) end raise GemfileError, %(an empty gem name is not valid) if name.empty? |