def method a = 3 b = 4 some_method_that_gives # [a, b] end
局部变量 http://ruby-doc.org/core/Kernel.html#method-i-local_variables
它输出符号数组,表示变量。在你的情况下:[:a, :b]
[:a, :b]