0
我是Ruby新手,我想測試我的簡單類。但是我無法創建實例。AST未定義的方法'新':模塊(NoMethodError)
這是我的代碼:
module AST
class AST
def initialize; end
def parse(src)
puts src
end
end
end
ast = AST.new # I've also tried 'AST.AST.new'
嘗試'AST :: AST.new' – Aetherus