diff --git a/src/spectator/dsl/groups.cr b/src/spectator/dsl/groups.cr index 15deaac..4a4c0f7 100644 --- a/src/spectator/dsl/groups.cr +++ b/src/spectator/dsl/groups.cr @@ -38,7 +38,7 @@ module Spectator::DSL what.is_a?(Path) || what.is_a?(TypeNode) || what.is_a?(Union)) && - (described_type = what.resolve?).is_a?(TypeNode) %} + what.resolve?.is_a?(TypeNode) %} {{what.symbolize}} {% elsif what.is_a?(StringLiteral) || what.is_a?(StringInterpolation) || diff --git a/src/spectator/example_node.cr b/src/spectator/example_node.cr index 42f970a..4444ddc 100644 --- a/src/spectator/example_node.cr +++ b/src/spectator/example_node.cr @@ -54,7 +54,8 @@ module Spectator # Add padding between the node names # only if the names don't appear to be symbolic. - io << ' ' unless !group.name? || # Skip blank group names (like the root group). + # Skip blank group names (like the root group). + io << ' ' unless !group.name? || # ameba:disable Style/NegatedConditionsInUnless (group.name?.is_a?(Symbol) && name.is_a?(String) && (name.starts_with?('#') || name.starts_with?('.'))) end