How to list local-variables in Ruby? December 13, 2023 by Tarik local_variables It outputs array of symbols, presenting variables. In your case: [:a, :b]