File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
actionview/lib/action_view Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -438,9 +438,13 @@ def compiled_source
438
438
439
439
method_arguments =
440
440
if set_strict_locals
441
- "output_buffer, #{ set_strict_locals } "
441
+ if set_strict_locals . include? ( "&" )
442
+ "output_buffer, #{ set_strict_locals } "
443
+ else
444
+ "output_buffer, #{ set_strict_locals } , &_"
445
+ end
442
446
else
443
- "local_assigns, output_buffer"
447
+ "local_assigns, output_buffer, &_ "
444
448
end
445
449
446
450
# Make sure that the resulting String to be eval'd is in the
@@ -505,6 +509,8 @@ def compile(mod)
505
509
![ :keyreq , :key , :keyrest , :nokey ] . include? ( parameter [ 0 ] )
506
510
end
507
511
512
+ non_kwarg_parameters . pop if non_kwarg_parameters . last == %i( block _ )
513
+
508
514
unless non_kwarg_parameters . empty?
509
515
mod . undef_method ( method_name )
510
516
You can’t perform that action at this time.
0 commit comments