From: sawadatsuyoshi@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:72479] [Ruby trunk - Bug #11871] [Open] Heredoc unindentation with <<~ with single-quoted identifier flush-lefts the content
Date: Fri, 25 Dec 2015 16:20:10 +0000 [thread overview]
Message-ID: <redmine.issue-11871.20151225162010.4d729a4e3444fd49@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11871.20151225162010@ruby-lang.org
Issue #11871 has been reported by Tsuyoshi Sawada.
----------------------------------------
Bug #11871: Heredoc unindentation with <<~ with single-quoted identifier flush-lefts the content
https://bugs.ruby-lang.org/issues/11871
* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Heredoc unindentation with `<<~` works as expected when the identifier is bare or double-quoted:
~~~
s = <<~_
fiwfewifjf
iofwejfweifwe
fjiofwejfweiof f
fiwejfweof
_
puts s
~~~
or
~~~
s = <<~"_"
fiwfewifjf
iofwejfweifwe
fjiofwejfweiof f
fiwejfweof
_
puts s
~~~
Output:
~~~
fiwfewifjf
iofwejfweifwe
fjiofwejfweiof f
fiwejfweof
~~~
But with a single-quoted identifier, the content is flushed left:
~~~
s = <<~'_'
fiwfewifjf
iofwejfweifwe
fjiofwejfweiof f
fiwejfweof
_
puts s
~~~
Output:
~~~
fiwfewifjf
iofwejfweifwe
fjiofwejfweiof f
fiwejfweof
~~~
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2015-12-25 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-11871.20151225162010@ruby-lang.org>
2015-12-25 16:20 ` sawadatsuyoshi [this message]
2016-02-03 11:12 ` [ruby-core:73686] [Ruby trunk Bug#11871] Heredoc unindentation with <<~ with single-quoted identifier flush-lefts the content usa
2016-03-29 12:21 ` [ruby-core:74686] " naruse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-11871.20151225162010.4d729a4e3444fd49@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).