fork download
  1. ANIMAL='Tiger'
  2. module Foo
  3. ANIMAL = 'Python'
  4. class Bar
  5. def value1
  6. print ANIMAL, " "
  7. end
  8. end
  9. end
  10.  
  11. class Foo::Bar
  12. def value2
  13. print ANIMAL, " "
  14. end
  15. end
  16.  
  17. Foo::Bar.new.value1
  18. Foo::Bar.new.value2
Success #stdin #stdout 0.01s 6276KB
stdin
Standard input is empty
stdout
Python Tiger