From 51765c0c8b7c569dc9f38b21cb65db7a89d8dc5e Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sun, 3 Mar 2019 19:06:37 -0700 Subject: [PATCH] Fix strange compiler error Compiler said there was an error, but not what it was. The compiler wasn't clear where the issue was either. --- src/spectator/formatting/match_data_values.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spectator/formatting/match_data_values.cr b/src/spectator/formatting/match_data_values.cr index d8d6301..a9edac1 100644 --- a/src/spectator/formatting/match_data_values.cr +++ b/src/spectator/formatting/match_data_values.cr @@ -8,7 +8,7 @@ module Spectator::Formatting # Creates the values mapper. def initialize(@values : T) - @max_key_length = T.types.keys.map(&.to_s.size).max + @max_key_length = @values.keys.map(&.to_s.size).max end # Yields pairs that can be printed to output.