lib/scope.rb in expressive-0.0.17 vs lib/scope.rb in expressive-0.0.18

- old
+ new

@@ -89,16 +89,16 @@ end syntax('lookup') do |scope, cells| lookup_result = scope.lookups[cells.first.text_value] if lookup_result - key = cells[1].text_value[1..-2] + key = cells[1] ? cells[1].text_value[1..-2] : nil if lookup_result.is_a?(Hash) lookup_result[key] elsif lookup_result.is_a?(Array) options = lookup_result.first the_proc = lookup_result.last - the_proc.call(options, key, *cells[2..-1].map {|cell| cell.eval(scope)}) + the_proc.call(options, key, *Array(cells[2..-1]).map {|cell| cell.eval(scope)}) end end end syntax('post') do |scope, cells|