Skip to content

Commit

Permalink
Add test for line number in HEREDOC with method call
Browse files Browse the repository at this point in the history
This is currently failing in JRuby (see jruby/jruby#7272).
  • Loading branch information
judofyr committed Feb 10, 2024
1 parent 8261185 commit c5bcf76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions language/heredoc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,10 @@
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
-> {
eval %{<<HERE.chomp\na\nb\#{c}\nHERE}
}.should raise_error(NameError) { |e| e.backtrace[0].should.start_with?("(eval):3") }
end
end

0 comments on commit c5bcf76

Please sign in to comment.