fork download
  1. module M
  2. @@counter = 0
  3.  
  4. def count1
  5. @@counter += 1
  6. end
  7.  
  8. def count2
  9. @@counter += 2
  10. end
  11.  
  12. def report
  13. puts @@counter
  14. end
  15. end
  16.  
  17. include M
  18.  
  19. count1
  20. count2
  21. report
Success #stdin #stdout 0.02s 7452KB
stdin
Standard input is empty
stdout
3