what i am basically trying to understand is:
When i do printer("ball") i am putting the string ball in the arg
variable of the printer method.
Forget the block for a moment. Your question pertains to method
arguments with or without an associated block.
Next, don't think of a variable as a container ("putting the
string 'ball' in the arg). Variables are not containers in Ruby
they are names. Think of sticking a post-it note on 'ball' and
written on the post-it note is 'arg'.
The post-it note gets created and stuck on 'ball' when you
call the method. The post-it note gets removed from 'ball'
when the method returns. Within the method the identifier
'arg' can be used to identify the string (in this case 'ball').
Outside the method 'arg' is meaningless since the post-it note
labeled 'arg' has been discarded.
When you call a method a second (or third or fourth...) time,
a new post-it note is created and stuck on the object and
'arg' is once again written on the post-it note and can be
used to identify the object you provided.
printer('ball') # within printer, arg refers to 'ball'
# no post-it note 'arg' between calls to printer
printer('baseball') # within printer, arg refers to 'baseball'
# no post-it note 'arg' between calls to printer
printer('football') # within printer, arg refers to 'football'
Gary Wright