summaryrefslogtreecommitdiff
path: root/lib/rubygems/installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r--lib/rubygems/installer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 52307f6d93..8ec75d1ff7 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -234,8 +234,8 @@ class Gem::Installer
io.gets # blankline
# TODO detect a specially formatted comment instead of trying
- # to run a regexp against Ruby code.
- next unless io.gets =~ /This file was generated by RubyGems/
+ # to find a string inside Ruby code.
+ next unless io.gets.to_s.include?("This file was generated by RubyGems")
ruby_executable = true
existing = io.read.slice(%r{