我有以下课程:
class User
code1 = Proc.new { }
code2 = lambda { }
define_method :test do
self.class.instance_eval &code1
self.class.instance_eval &code2
end
end
User.new.test
为什么第二个instance_eval
失败并出现wrong number of arguments (1 for 0)
错误?