首页 > 技术文章 > 注意,ruby循环体定义的变量在结束时后,变量还存在
or2- 2015-12-04 13:34 原文
a = [1, 2, 3] for i in a b = 123 p i end p "b:#{b}" p i
《ruby语言编程》 129页 倒数 第8行