File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ def serializable_hash(runtime_options = {})
514514 end
515515
516516 def exec_with_object ( options , &block )
517- if block . parameters . count == 1
517+ if block . parameters . count == 1 || block . parameters == [ [ :req ] , [ :rest ] ]
518518 instance_exec ( object , &block )
519519 else
520520 instance_exec ( object , options , &block )
@@ -523,6 +523,7 @@ def exec_with_object(options, &block)
523523 # it handles: https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md#language-changes point 3, Proc
524524 # accounting for expose :foo, &:bar
525525 if e . is_a? ( ArgumentError ) && block . parameters == [ [ :req ] , [ :rest ] ]
526+ Rails . logger . error ( "***** ERROR in exec_with_object: #{ e . message } \n #{ e . backtrace . join ( "\n " ) } " )
526527 raise Grape ::Entity ::Deprecated . new e . message , 'in ruby 3.0'
527528 end
528529
You can’t perform that action at this time.
0 commit comments