Skip to content

Commit 6e6eb41

Browse files
marcrohloffnumbata
authored andcommitted
Include PR recommendations
1 parent 99edb4c commit 6e6eb41

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/grape_entity/entity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def ensure_block_arity!(block)
552552
return if required_positional_arg_count.zero?
553553

554554
raise ArgumentError, <<~MSG
555-
Cannot use `&:#{origin_method_name}` because that method expects #{required_positional_arg_count} #{'argument'.pluralize(required_positional_arg_count)}.
555+
Cannot use `&:#{origin_method_name}` because that method expects #{required_positional_arg_count} argument#{'s' if required_positional_arg_count != 1}.
556556
Symbol‐to‐proc shorthand only works for zero‐argument methods.
557557
MSG
558558
end

spec/grape_entity/entity_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def method_with_optional_args_as_a_splat(*_optional_args)
420420
'result'
421421
end
422422

423-
def method_with_required_args_and_an_optional_splat(_required_arg, *_optional_argds)
423+
def method_with_required_args_and_an_optional_splat(_required_arg, *_optional_args)
424424
'result'
425425
end
426426

0 commit comments

Comments
 (0)