Skip to content

Instantly share code, notes, and snippets.

@rohitarondekar
Created February 21, 2012 04:58
Show Gist options
  • Save rohitarondekar/1873847 to your computer and use it in GitHub Desktop.
Save rohitarondekar/1873847 to your computer and use it in GitHub Desktop.
ruby-1.9.3-p0 :001 > def foo
ruby-1.9.3-p0 :002?> def boo
ruby-1.9.3-p0 :003?> puts "in boo"
ruby-1.9.3-p0 :004?> end
ruby-1.9.3-p0 :005?> puts "in foo"
ruby-1.9.3-p0 :006?> end
=> nil
ruby-1.9.3-p0 :007 > foo
in foo
=> nil
ruby-1.9.3-p0 :008 > def foo
ruby-1.9.3-p0 :009?> def boo
ruby-1.9.3-p0 :010?> puts "in boo"
ruby-1.9.3-p0 :011?> end
ruby-1.9.3-p0 :012?> puts "in foo"
ruby-1.9.3-p0 :013?> boo
ruby-1.9.3-p0 :014?> end
=> nil
ruby-1.9.3-p0 :015 > foo
in foo
in boo
=> nil
ruby-1.9.3-p0 :016 > foo.boo
in foo
in boo
in boo
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment