$cnt = 0 END { puts RUBY_DESCRIPTION, "$cnt = #{$cnt}" } def foo; $cnt += 1; foo end foo
Standard input is empty
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux] $cnt = 9356
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!