Skip to content

Commit cf0d2be

Browse files
Changed incorrect instances of 'arguments' to 'parameters'
1 parent 31d7b6a commit cf0d2be

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ Translations of the guide are available in the following languages:
624624
```
625625

626626
* <a name="method-parens"></a>
627-
Use `def` with parentheses when there are arguments. Omit the
628-
parentheses when the method doesn't accept any arguments.
627+
Use `def` with parentheses when there are parameters. Omit the
628+
parentheses when the method doesn't accept any parameters.
629629
<sup>[[link](#method-parens)]</sup>
630630

631631
```Ruby
@@ -640,12 +640,12 @@ Translations of the guide are available in the following languages:
640640
end
641641

642642
# bad
643-
def some_method_with_arguments arg1, arg2
643+
def some_method_with_parameters param1, param2
644644
# body omitted
645645
end
646646

647647
# good
648-
def some_method_with_arguments(arg1, arg2)
648+
def some_method_with_parameters(param1, param2)
649649
# body omitted
650650
end
651651
```
@@ -1925,7 +1925,7 @@ condition](#safe-assignment-in-condition).
19251925
<sup>[[link](#reduce-blocks)]</sup>
19261926

19271927
* <a name="other-arg"></a>
1928-
When defining binary operators, name the argument `other`(`<<` and `[]` are
1928+
When defining binary operators, name the parameter `other`(`<<` and `[]` are
19291929
exceptions to the rule, since their semantics are different).
19301930
<sup>[[link](#other-arg)]</sup>
19311931

@@ -3282,11 +3282,11 @@ condition](#safe-assignment-in-condition).
32823282
UNSAFE_STRING_METHODS.each do |unsafe_method|
32833283
if 'String'.respond_to?(unsafe_method)
32843284
class_eval <<-EOT, __FILE__, __LINE__ + 1
3285-
def #{unsafe_method}(*args, &block) # def capitalize(*args, &block)
3285+
def #{unsafe_method}(*params, &block) # def capitalize(*params, &block)
32863286
to_str.#{unsafe_method}(*args, &block) # to_str.capitalize(*args, &block)
32873287
end # end
32883288

3289-
def #{unsafe_method}!(*args) # def capitalize!(*args)
3289+
def #{unsafe_method}!(*params) # def capitalize!(*params)
32903290
@dirty = true # @dirty = true
32913291
super # super
32923292
end # end
@@ -3310,7 +3310,7 @@ condition](#safe-assignment-in-condition).
33103310

33113311
```ruby
33123312
# bad
3313-
def method_missing?(meth, *args, &block)
3313+
def method_missing?(meth, *params, &block)
33143314
if /^find_by_(?<prop>.*)/ =~ meth
33153315
# ... lots of code to do a find_by
33163316
else
@@ -3319,7 +3319,7 @@ condition](#safe-assignment-in-condition).
33193319
end
33203320

33213321
# good
3322-
def method_missing?(meth, *args, &block)
3322+
def method_missing?(meth, *params, &block)
33233323
if /^find_by_(?<prop>.*)/ =~ meth
33243324
find_by(prop, *args, &block)
33253325
else
@@ -3394,7 +3394,7 @@ condition](#safe-assignment-in-condition).
33943394
Code in a functional way, avoiding mutation when that makes sense.
33953395
<sup>[[link](#functional-code)]</sup>
33963396

3397-
* <a name="no-arg-mutations"></a>
3397+
* <a name="no-param-mutations"></a>
33983398
Do not mutate arguments unless that is the purpose of the method.
33993399
<sup>[[link](#no-arg-mutations)]</sup>
34003400

0 commit comments

Comments
 (0)