File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ def load_options
166
166
rescue Psych ::SyntaxError
167
167
end
168
168
169
+ return RDoc ::Options . new if options == false # Allow empty file.
170
+
169
171
raise RDoc ::Error , "#{ options_file } is not a valid rdoc options file" unless
170
172
RDoc ::Options === options or Hash === options
171
173
Original file line number Diff line number Diff line change @@ -133,6 +133,17 @@ def test_load_options_invalid
133
133
end
134
134
end
135
135
136
+ def test_load_options_empty_file
137
+ temp_dir do
138
+ File . open '.rdoc_options' , 'w' do |io |
139
+ end
140
+
141
+ options = @rdoc . load_options
142
+
143
+ assert_equal 'rdoc' , options . markup
144
+ end
145
+ end
146
+
136
147
def test_load_options_partial_override
137
148
temp_dir do
138
149
File . open '.rdoc_options' , 'w' do |io |
You can’t perform that action at this time.
0 commit comments