in The Ruby Way...chap 1...a crude example of closure doesn't work as 
this irb
session:
>> def power(exponent)
>>  proc {|base| base**exponent}
>> end
=> nil
>> square = power(2)
=> #<Proc:0x02dc58f0@(irb):2>
>> cube = power(3)
=> #<Proc:0x02dc58f0@(irb):2>
>> p square
#<Proc:0x02dc58f0@(irb):2>
=> nil
>> square(11)
NoMethodError: undefined method `square' for main:Object
        from (irb):7
>> a=square(11)
NoMethodError: undefined method `square' for main:Object
        from (irb):8
>> power 2
=> #<Proc:0x02dc58f0@(irb):2>
>> end
SyntaxError: compile error
(irb):10: syntax error
        from (irb):10
>> square 11
NoMethodError: undefined method `square' for main:Object
..futhermore...where (if it's implied...) is base come into play 
here....

-- 
Posted via http://www.ruby-forum.com/.