fork download
  1. class Hi
  2. puts "class is being created"
  3. def initialize
  4. a = 5
  5. puts Kernel.local_variables.join(", ")
  6. end
  7.  
  8. def bye
  9. b = 7
  10. puts Kernel.local_variables.join(", ")
  11. end
  12. end
  13.  
  14. Hi.new
  15. Hi.new.bye
Success #stdin #stdout 0.02s 7412KB
stdin
Standard input is empty
stdout
class is being created
a
a
b