diff options
author | aycabta <[email protected]> | 2021-03-07 10:13:14 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-03-16 15:47:27 +0900 |
commit | 971a0cd246db6578e1ea8760a903e1a23e3681f3 (patch) | |
tree | 7fa26377fac2c500522cec48160e99ce8eb9207a /lib/rdoc/rdoc.rb | |
parent | de8e6218a3257fe19b46ff0aa157e66f452ac8b7 (diff) |
[ruby/rdoc] Allow partial default values to be overridden with .rdoc_options
https://github.com/ruby/rdoc/commit/e14800891f
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4274
Diffstat (limited to 'lib/rdoc/rdoc.rb')
-rw-r--r-- | lib/rdoc/rdoc.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 93e764c462..c47f639cc4 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -167,7 +167,12 @@ class RDoc::RDoc end raise RDoc::Error, "#{options_file} is not a valid rdoc options file" unless - RDoc::Options === options + RDoc::Options === options or Hash === options + + if Hash === options + # Override the default values with the contents of YAML file. + options = RDoc::Options.new options + end options end |