aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/commands/setup_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/setup_command.rb')
-rw-r--r--lib/rubygems/commands/setup_command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 681db0dc1d..6617396780 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -446,7 +446,7 @@ abort "#{deprecation_message}"
history.force_encoding Encoding::UTF_8 if
Object.const_defined? :Encoding
- history = history.sub(/^# coding:.*?^=/m, '')
+ history = history.sub(/^# coding:.*?(?=^=)/m, '')
text = history.split(HISTORY_HEADER)
text.shift # correct an off-by-one generated by split