lib/roda.rb in roda-3.27.0 vs lib/roda.rb in roda-3.28.0

- old
+ new

@@ -123,13 +123,15 @@ if check_dynamic_arity = opts.fetch(:check_dynamic_arity, check_arity) if keyword # Complexity of handling keyword arguments using define_method is too high, # Fallback to instance_exec in this case. b = block - if RUBY_VERSION >= '2.7' - block = eval('lambda{|*a, **kw| instance_exec(*a, **kw, &b)}', nil, __FILE__, __LINE__) # Keyword arguments fallback + block = if RUBY_VERSION >= '2.7' + eval('lambda{|*a, **kw| instance_exec(*a, **kw, &b)}', nil, __FILE__, __LINE__) # Keyword arguments fallback else - block = lambda{|*a| instance_exec(*a, &b)} # Keyword arguments fallback + # :nocov: + lambda{|*a| instance_exec(*a, &b)} # Keyword arguments fallback + # :nocov: end else arity_meth = meth meth = :"#{meth}_arity" end