summaryrefslogtreecommitdiff
path: root/spec/ruby/language/heredoc_spec.rb
diff options
context:
space:
mode:
authorAndrew Konchin <[email protected]>2024-07-01 15:38:25 +0300
committerBenoit Daloze <[email protected]>2024-07-02 13:33:48 +0200
commitcee62c6738c42ce774e96e180cf2d46afb8e9cbe (patch)
tree52a37ef94e90f99f8471dbba4d6659ca5dc6c532 /spec/ruby/language/heredoc_spec.rb
parentd7af8afe1b85b8de04cd77c673b0f6ef3f3627fa (diff)
Update to ruby/spec@f8987ac
Diffstat (limited to 'spec/ruby/language/heredoc_spec.rb')
-rw-r--r--spec/ruby/language/heredoc_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/language/heredoc_spec.rb b/spec/ruby/language/heredoc_spec.rb
index b3b160fd11..47ee9c2c51 100644
--- a/spec/ruby/language/heredoc_spec.rb
+++ b/spec/ruby/language/heredoc_spec.rb
@@ -106,4 +106,14 @@ HERE
SquigglyHeredocSpecs.least_indented_on_the_first_line_single.should == "a\n b\n c\n"
SquigglyHeredocSpecs.least_indented_on_the_last_line_single.should == " a\n b\nc\n"
end
+
+ it "reports line numbers inside HEREDOC with method call" do
+ -> {
+ <<-HERE.chomp
+ a
+ b
+ #{c}
+ HERE
+ }.should raise_error(NameError) { |e| e.backtrace[0].should.start_with?("#{__FILE__}:#{__LINE__ - 2}") }
+ end
end