Skip to content

Commit ca64d7a

Browse files
committed
Add a comment for the reason of options.dup
1 parent c5a64f4 commit ca64d7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rdoc/rubygems_hook.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ def generate
189189
say "Parsing documentation for #{@spec.full_name}"
190190

191191
Dir.chdir @spec.full_gem_path do
192+
# RDoc::Options#finish must be called before parse_files.
193+
# RDoc::Options#finish is also called after ri/darkfish generator setup.
194+
# We need to dup the options to avoid modifying it after finish is called.
192195
parse_options = options.dup
193196
parse_options.finish
194197
@rdoc.options = parse_options

0 commit comments

Comments
 (0)