mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
parent
0599184a18
commit
9688093124
3 changed files with 29 additions and 0 deletions
|
@ -209,6 +209,13 @@ module Prism
|
|||
assert_equal "", location.slice
|
||||
end
|
||||
|
||||
def test_location_slice_lines
|
||||
result = Prism.parse("\nprivate def foo\nend\n")
|
||||
method = result.value.statements.body.first.arguments.arguments.first
|
||||
|
||||
assert_equal "private def foo\nend\n", method.slice_lines
|
||||
end
|
||||
|
||||
def test_heredoc?
|
||||
refute parse_expression("\"foo\"").heredoc?
|
||||
refute parse_expression("\"foo \#{1}\"").heredoc?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue