File tree 1 file changed +2
-1
lines changed
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 = {})
514
514
end
515
515
516
516
def exec_with_object ( options , &block )
517
- if block . parameters . count == 1
517
+ if block . parameters . count == 1 || block . parameters == [ [ :req ] , [ :rest ] ]
518
518
instance_exec ( object , &block )
519
519
else
520
520
instance_exec ( object , options , &block )
@@ -523,6 +523,7 @@ def exec_with_object(options, &block)
523
523
# it handles: https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md#language-changes point 3, Proc
524
524
# accounting for expose :foo, &:bar
525
525
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 " ) } " )
526
527
raise Grape ::Entity ::Deprecated . new e . message , 'in ruby 3.0'
527
528
end
528
529
You can’t perform that action at this time.
0 commit comments