From e4b20b37a8935efd21a654ed88653f96ba87c446 Mon Sep 17 00:00:00 2001 From: Mike DeAngelo Date: Tue, 7 Nov 2023 14:38:11 -0500 Subject: [PATCH] fix: remove eval from lib/gzr/commands/group/member_groups.rb --- lib/gzr/commands/group/member_groups.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/gzr/commands/group/member_groups.rb b/lib/gzr/commands/group/member_groups.rb index 7d3a5c0..f4414f6 100644 --- a/lib/gzr/commands/group/member_groups.rb +++ b/lib/gzr/commands/group/member_groups.rb @@ -48,11 +48,8 @@ def execute(input: $stdin, output: $stdout) table_hash = Hash.new fields = field_names(@options[:fields]) table_hash[:header] = fields unless @options[:plain] - expressions = fields.collect { |fn| field_expression_hash(fn) } table_hash[:rows] = data.map do |row| - expressions.collect do |e| - eval "row#{e}" - end + field_expressions_eval(fields,row) end table = TTY::Table.new(table_hash) alignments = fields.collect do |k|