Skip to content

Commit f893fdb

Browse files
committed
Convert !~ call into !include?
This particular case is safe to convert, since super should always return a string.
1 parent 47908ae commit f893fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/roda/plugins/view_options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def render_layout_opts
182182
# contain a slash.
183183
def template_name(opts)
184184
name = super
185-
if (v = @_view_subdir) && name !~ /\//
185+
if (v = @_view_subdir) && !name.include?('/')
186186
"#{v}/#{name}"
187187
else
188188
name

0 commit comments

Comments
 (0)