A parameter is a variable named in a method definition to receive a value when the method is called. In `def obj.c2f(c)`, `c` is the formal parameter; in `obj.c2f(100)`, `100` is the argument. The method uses the received value to calculate a result. Ruby permits parentheses to be omitted in many definitions and calls, but keeping them is often clearer, especially when calls are combined. section 2.1.3
A method signature determines how arguments are assigned:
- A plain parameter is required: each one needs a corresponding argument. Supplying the wrong number raises `ArgumentError`. section 2.4.1
- A default-valued parameter, such as `c=1`, receives its default when no argument is supplied for it; an argument overrides the default. section 2.4.1
- A starred parameter, such as `*c`, collects remaining arguments in an array, which is empty if none remain. section 2.4.1
Required parameters take priority
With `def mixed_args(a,b,*c,d)`, calling `mixed_args(1,2,3,4,5)` assigns `1` and `2` to `a` and `b`, `5` to `d`, and `[3,4]` to `c`. Required parameters on either side of `*c` receive values before the starred parameter collects what remains. Default-valued and starred parameters belong between required parameters; a starred parameter cannot precede a default-valued one. section 2.4.2 section 2.4.3
Argument binding gives method parameters local variables usable during the method call. Blocks also have parameters: `5.times { |i| ... }` binds `i` to each yielded value, from `0` through `4`. A proc is less strict about argument count than a method: a missing argument binds its parameter to `nil`, while extra arguments can be discarded. section 2.4.3 section 6.3.5 section 14.1.6
Keep signatures reasonably simple when combining required, default-valued, and starred parameters. Keyword arguments are another form of argument handling, treated separately from these positional examples. section 2.4.3 section 2.4













