class Cat
def initialize(name)
@name = name
end
def whatthehell()
puts 'haaa'
end
end
cat = Cat.new('Kitty')
puts cat.whatthehell
puts cat.name
错误信息:test.rb:13:in <main>': undefined method
name' for # (NoMethodError)
= =请问这是什么回事呢??想不出来