summaryrefslogtreecommitdiff
path: root/lib/erb.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-25 13:57:28 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-25 13:57:28 +0000
commitb5569b9ab2ad5e0e4a997df7eb73e97ecbacc9dd (patch)
treea0d47ff0f9f7bcf3ba7db978954581a9ddab2bd3 /lib/erb.rb
parent3a0471faa0d383392ba05b3a6409b973b7b009d1 (diff)
erb.rb: print deprecation warning with warn level 1
This was planned to be removed in Ruby 2.7 at first, but I changed my mind to just keep warning it in Ruby 2.7. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/erb.rb')
-rw-r--r--lib/erb.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/erb.rb b/lib/erb.rb
index 5b725d7820..74b18bb585 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -812,18 +812,18 @@ class ERB
# A well messages pattie, breaded and fried.
#
def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout')
- # Complex initializer for $SAFE deprecation at Feature #14256, which should be removed at Ruby 2.7.
+ # Complex initializer for $SAFE deprecation at [Feature #14256], which should be removed at a version later than 2.7.
if safe_level != NOT_GIVEN
- warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1 if $VERBOSE
+ warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1
else
safe_level = nil
end
if legacy_trim_mode != NOT_GIVEN
- warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1 if $VERBOSE
+ warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1
trim_mode = legacy_trim_mode
end
if legacy_eoutvar != NOT_GIVEN
- warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1 if $VERBOSE
+ warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1
eoutvar = legacy_eoutvar
end