str = "a='abcd'; a.reverse" 字符串str为ruby代码,执行方法eval eval str => "dcba" 转载于:https://www.cnblogs.com/wangyuyu/p/6924999.html