File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -304,14 +304,15 @@ def init_with map # :nodoc:
304
304
@main_page = map [ 'main_page' ]
305
305
@markup = map [ 'markup' ]
306
306
@op_dir = map [ 'op_dir' ]
307
- @rdoc_include = map [ 'rdoc_include' ]
308
307
@show_hash = map [ 'show_hash' ]
309
- @static_path = map [ 'static_path' ]
310
308
@tab_width = map [ 'tab_width' ]
311
309
@template_dir = map [ 'template_dir' ]
312
310
@title = map [ 'title' ]
313
311
@visibility = map [ 'visibility' ]
314
312
@webcvs = map [ 'webcvs' ]
313
+
314
+ @rdoc_include = sanitize_path map [ 'rdoc_include' ]
315
+ @static_path = sanitize_path map [ 'static_path' ]
315
316
end
316
317
317
318
def yaml_initialize tag , map # :nodoc:
Original file line number Diff line number Diff line change @@ -138,7 +138,24 @@ def test_init_with_encoding
138
138
139
139
options = YAML . load YAML . dump @options
140
140
141
- assert_equal Encoding ::IBM437 , @options . encoding
141
+ assert_equal Encoding ::IBM437 , options . encoding
142
+ end
143
+
144
+ def test_init_with_trim_paths
145
+ RDoc . load_yaml
146
+
147
+ yaml = <<-YAML
148
+ --- !ruby/object:RDoc::Options
149
+ static_path:
150
+ - /etc
151
+ rdoc_include:
152
+ - /etc
153
+ YAML
154
+
155
+ options = YAML . load yaml
156
+
157
+ assert_empty options . rdoc_include
158
+ assert_empty options . static_path
142
159
end
143
160
144
161
def test_parse_copy_files_file_relative
You can’t perform that action at this time.
0 commit comments