lib/roda/plugins/multi_run.rb in roda-3.48.0 vs lib/roda/plugins/multi_run.rb in roda-3.49.0
- old
+ new
@@ -89,10 +89,10 @@
module RequestMethods
# If one of the stored route prefixes match the current request,
# dispatch the request to the stored rack application.
def multi_run
on self.class.multi_run_regexp do |prefix|
- yield prefix if block_given?
+ yield prefix if defined?(yield)
run scope.class.multi_run_apps[prefix]
end
end
end
end