fork download
  1. class Zombie
  2. attr_accessor :name
  3. def initialize
  4. @name = 'Ash'
  5. end
  6. end
  7.  
  8. in irb:
  9. load 'zombie.rb'
  10. a = Zombie.new
  11. a.name
  12. NoMethoderror: undefined method 'name' for #<Zombie...>
Runtime error #stdin #stdout #stderr 0.02s 7448KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.rb:8: syntax error, unexpected keyword_in, expecting $end
in irb:
  ^