Skip to content

Commit d8f4809

Browse files
committed
Include PR recommendations
1 parent 098fd33 commit d8f4809

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
@@ -554,7 +554,7 @@ def ensure_block_arity!(block)
554554
return if required_positional_arg_count.zero?
555555

556556
raise ArgumentError, <<~MSG
557-
Cannot use `&:#{origin_method_name}` because that method expects #{required_positional_arg_count} #{'argument'.pluralize(required_positional_arg_count)}.
557+
Cannot use `&:#{origin_method_name}` because that method expects #{required_positional_arg_count} argument#{'s' if required_positional_arg_count != 1}.
558558
Symbol‐to‐proc shorthand only works for zero‐argument methods.
559559
MSG
560560
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)