gotascii (owner)

Revisions

  • 37d40d gotascii Thu Oct 22 09:06:02 -0700 2009
  • 472e30 gotascii Thu Oct 22 09:05:38 -0700 2009
gist: 216053 Download_button fork
public
Public Clone URL: git://gist.github.com/216053.git
Embed All Files: show embed
nested_block_scope.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def inner(&block)
  @inner = block if block_given?
  @inner
end
 
outter = lambda do
  name = 'outter'
  inner do
    puts "inner sees #{name}"
  end
end
 
outter.call
inner.call