From 19408db5022706833cb705dda727b45bf1a7751c Mon Sep 17 00:00:00 2001 From: Joel Drapper Date: Tue, 31 Oct 2023 20:08:04 +0000 Subject: [PATCH] Allow rendering strings --- lib/phlex/sgml.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/phlex/sgml.rb b/lib/phlex/sgml.rb index c2e80020..0599c2d0 100644 --- a/lib/phlex/sgml.rb +++ b/lib/phlex/sgml.rb @@ -228,8 +228,10 @@ def render(renderable, &block) else yield_content(&renderable) end + when String + plain(renderable) else - raise ArgumentError, "You can't render a #{renderable}." + raise ArgumentError, "You can't render a #{renderable.inspect}." end nil