A call and its result
In `x = "100".to_i`, the string is the receiver. The dot sends it the message `to_i`; the resulting integer, `100`, is assigned to `x`. “Calling a method” describes the usual result of sending a message, but a receiver is not guaranteed to have a matching method. section 1.1.4
A method call has a method name and, optionally, an argument list and a code block. An explicit receiver needs a dot; without one, the receiver defaults to `self`. Every call returns a value. Calls are how objects are asked to provide information or perform actions. section 6.3.3 section 2.1.3 section 2.6
Keep these parts distinct:
- Arguments are values supplied at the call site; parameters are variables named in the method definition. Parameters may be required, collect extra arguments, or have defaults. Supplying the wrong number of required arguments raises `ArgumentError`. section 2.1.3 section 2.4.1
- A block belongs to the call but is not an argument. A method can yield to it only when one is supplied; some methods also work without one. section 6.3.3
- Parentheses around arguments are often optional, but they help clarify calls strung together. For a no-argument call, omitting them is common. section 2.1.3
loop { puts "Hi" } # code block but no arguments
loop() { puts "Hi" } # code block, explicit empty argument list
string.scan(/[^,]+/) # one argument, no code block
string.scan(/[^,]+/) {|word| puts word } # one argument and a code block
Compare `loop` with and without an explicit empty argument list, then `scan` with an argument alone and with both an argument and a block. section 6.3.3
A bare word can also be a method call, as with `puts`. Parentheses identify `x()` as a call; without them, Ruby may need to resolve the name as either a local variable or a method. This distinction matters when reading an undefined-name error. section 2.5.4

