Project

General

Profile

Actions

Bug #11746

closed

RDoc incorrect example call method on heredoc

Added by manuel (Jose Manuel Garcia) almost 7 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:71705]

Description

The sample code for a call on a heredoc at http://ruby-doc.org/core-2.3.0_preview1/doc/syntax/literals_rdoc.html#label-Here+Documents
for

To call a method on a heredoc place it after the opening identifier:

I think it should be

expected_result = <<HEREDOC.chomp
One plus one is #{1 + 1}
HEREDOC

instead of

expected_result = "One plus one is #{1 + 1}
".chomp

Regards

Actions

Also available in: Atom PDF