fork download
  1. $cnt = 0
  2.  
  3. END { puts RUBY_DESCRIPTION, "$cnt = #{$cnt}" }
  4.  
  5. def foo; $cnt += 1; foo end
  6.  
  7. foo
  8.  
Runtime error #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
$cnt = 9356