Skip to content

Commit

Permalink
Fix for String#chomp changes (related to crystal-lang#3704)
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust committed Dec 27, 2016
1 parent dcee155 commit 937dc9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/crystal/tools/expand.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ module Crystal
expansions.try &.each_with_index do |expansion, i|
io.puts "expansion #{i + 1}:"
io << " "
io.puts expansion.original.lines.join " "
io.puts expansion.original.lines(chomp: false).join " "
io.puts
expansion.expandeds.each_with_index do |expanded, j|
io << "~> "
io.puts expanded.lines.join " "
io.puts expanded.lines(chomp: false).join " "
io.puts
end
end
Expand All @@ -38,7 +38,7 @@ module Crystal
s = node.to_s
return s unless node.is_a?(MacroIf) || node.is_a?(MacroFor)
indent = node.location.not_nil!.column_number - 1
s.lines.map do |line|
s.lines(chomp: false).map do |line|
i = 0
line.each_char do |c|
break unless c == ' ' && i < indent
Expand Down

0 comments on commit 937dc9d

Please sign in to comment.