From: takashikkbn@gmail•com
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50404] [Ruby trunk Feature#14255][Closed] Deprecate $SAFE support in ERB
Date: Thu, 28 Dec 2017 05:53:47 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-69076.20171228055346.807a15345cd0bcc2@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-14255.20171228053551@ruby-lang.org
Issue #14255 has been updated by k0kubun (Takashi Kokubun).
Status changed from Open to Closed
Changed from ruby-dev to ruby-core https://bugs.ruby-lang.org/issues/14256
----------------------------------------
Feature #14255: Deprecate $SAFE support in ERB
https://bugs.ruby-lang.org/issues/14255#change-69076
* Author: k0kubun (Takashi Kokubun)
* Status: Closed
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 2.6
----------------------------------------
See https://bugs.ruby-lang.org/issues/14250.
Proc-level $SAFE change does no longer make sense. This should be deprecated and then removed. But the problem is that the position of safe_level argument is in the middle of argument list of ERB#initialize.
So to remove it safely, we should make them keyword arguments and deprecate the current non-keyword-argument interface. Having both interfaces would be backward-compatible because all of arguments don't take {}.
## before
```
ERB.new("<%= 'foo' %>", 1, '%', '_erbout')
```
## after
```
ERB.new("<%= 'foo' %>", 1, '%', '_erbout') # print deprecation in 2.6, and removed in 2.7
ERB.new("<%= 'foo' %>", trim_mode: '%', eoutvar: '_erbout') # no safe_level support from first
```
--
https://bugs.ruby-lang.org/
prev parent reply other threads:[~2017-12-28 5:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-14255.20171228053551@ruby-lang.org>
2017-12-28 5:35 ` [ruby-dev:50403] [Ruby trunk Feature#14255] Deprecate $SAFE support from ERB takashikkbn
2017-12-28 5:53 ` takashikkbn [this message]
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.journal-69076.20171228055346.807a15345cd0bcc2@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).