Skip to content

Commit 102be34

Browse files
makenowjustSantiago Palladino
authored and
Santiago Palladino
committedFeb 11, 2017
Correct a doc comment for LiteralExpander of StringInterpolation
It uses String::Builder instead of IO::Memory now.
1 parent a78d44d commit 102be34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/compiler/crystal/semantic/literal_expander.cr

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,15 @@ module Crystal
291291
Call.new(path, "new", [node.from, node.to, bool]).at(node)
292292
end
293293

294-
# Convert an interpolation to a concatenation with an IO::Memory:
294+
# Convert an interpolation to a concatenation with an String::Builder:
295295
#
296296
# From:
297297
#
298298
# "foo#{bar}baz"
299299
#
300300
# To:
301301
#
302-
# (IO::Memory.new << "foo" << bar << "baz").to_s
302+
# (String::Builder.new << "foo" << bar << "baz").to_s
303303
def expand(node : StringInterpolation)
304304
# Compute how long at least the string will be, so we
305305
# can allocate enough space.

0 commit comments

Comments
 (0)
Failed to load comments.