diff --git a/src/spectator/abstract_expression.cr b/src/spectator/abstract_expression.cr index 3bb20f2..dc4ba13 100644 --- a/src/spectator/abstract_expression.cr +++ b/src/spectator/abstract_expression.cr @@ -47,7 +47,7 @@ module Spectator # This consists of the label (if one is available) and the value. def inspect(io) if (label = @label) - io << @label + io << label io << ':' io << ' ' end diff --git a/src/spectator/lazy.cr b/src/spectator/lazy.cr index 25aaed5..7a477b3 100644 --- a/src/spectator/lazy.cr +++ b/src/spectator/lazy.cr @@ -8,8 +8,8 @@ module Spectator # The block should return the value to store. # Subsequent calls will return the same value and not yield. def get(&block : -> T) - if (value = @value) - value.get + if (existing = @value) + existing.get else yield.tap do |value| @value = Value.new(value)