eval(File.read(file))
如题,eval 这个找了半天没找到官方说明,不知道是干什么用的,有大佬能解释一下或者给个链接吗
https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-eval
就是把字符串当做代码来执行
eval is evil
eval is not evil by itself, its a method like other methods.