ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: shuujii@gmail•com
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50710] [Ruby trunk Bug#15421] erb コマンドの -P オプションの説明
Date: Sun, 16 Dec 2018 11:49:30 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-15421.20181216114928.7d9bb6db57dc12e5@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15421.20181216114928@ruby-lang.org

Issue #15421 has been reported by shuujii (Shuji KOBAYASHI).

----------------------------------------
Bug #15421: erb コマンドの -P オプションの説明
https://bugs.ruby-lang.org/issues/15421

* Author: shuujii (Shuji KOBAYASHI)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0rc2 (2018-12-15 trunk 66408) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
`erb` コマンドの `-P` オプションは、`%` で始まる行を Ruby コードとして評価する機能を無効にする、という意味だと思うのですが、man ページの説明は以下のようになっていて正しくないように思います。

~~~
-P    Evaluates lines starting with % as Ruby code and removes
      the tailing EOLs.
~~~

また、`erb --help` の説明は以下のようになっていて、行を無視する訳ではないのでこちらもあまり適切ではないように思います。

~~~
-P    ignore lines which start with "%"
~~~

RDoc での trim mode の説明を参考に修正したパッチを添付します。

---Files--------------------------------
improve-description-of-erb-P.patch (1.25 KB)


-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2018-12-16 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15421.20181216114928@ruby-lang.org>
2018-12-16 11:49 ` shuujii [this message]
2018-12-16 14:26 ` [ruby-dev:50711] [Ruby trunk Bug#15421] erb コマンドの -P オプションの説明 takashikkbn

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-15421.20181216114928.7d9bb6db57dc12e5@ruby-lang.org \
    --to=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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).