Skip to content

Commit

Permalink
Correct a doc comment for LiteralExpander of StringInterpolation
Browse files Browse the repository at this point in the history
It uses String::Builder instead of IO::Memory now.
  • Loading branch information
makenowjust authored and Santiago Palladino committed Feb 11, 2017
1 parent a78d44d commit 102be34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/crystal/semantic/literal_expander.cr
Expand Up @@ -291,15 +291,15 @@ module Crystal
Call.new(path, "new", [node.from, node.to, bool]).at(node)
end

# Convert an interpolation to a concatenation with an IO::Memory:
# Convert an interpolation to a concatenation with an String::Builder:
#
# From:
#
# "foo#{bar}baz"
#
# To:
#
# (IO::Memory.new << "foo" << bar << "baz").to_s
# (String::Builder.new << "foo" << bar << "baz").to_s
def expand(node : StringInterpolation)
# Compute how long at least the string will be, so we
# can allocate enough space.
Expand Down

0 comments on commit 102be34

Please sign in to comment.