Project

General

Profile

Bug #14584

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

Given this program: 

 ~~~ruby ~~~ 
 text1 = <<~FOO 
   one#{"     two     "} 
   FOO 

 text2 = <<~FOO 
 one#{"     two     "} 
 FOO 

 p text1 
 p text2 
 ~~~ 

 The output is: 

 ~~~ 
 "one two     \n" 
 "one     two     \n" 
 ~~~ 

 The two should be equal. 

 I think the problem happens because squigly heredoc will remove the first two spaces from each line in the heredoc, but it seems to also be removing it from literals inside interpolation inside a heredoc.

Back