ブロックの中のブロック?

?> def hoge
>>   yield 1
>> end
=> nil
>> 
?> def bar
>>   yield 2
>> end
=> nil
>>  
?> total = 0
=> 0
>> 
?> hoge {|e| total+=e; bar{|e| total+=e}}
=> 3
>> total
=> 3
>> def hoge
>>   p = Proc.new{p "world"}
>>   yield p
>> end
=> nil
>> hoge{|e| p "hello"; e.call}
"hello"
"world"
=> nil
?> def hoge
>>   p = Proc.new{bar}
>>   yield p
>> end
=> nil
>> def bar
>>   puts "bar"
>> end
=> nil
>> hoge{|e| e.call}
bar
=> nil