aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-01 14:16:55 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-02-01 14:20:11 +0900
commit7ebfb319ffbfc1f9d3dc5439052ae06019bf4290 (patch)
tree64d61f0307323d11f46e8ca153d3eed8e8355d00 /tasks
parent6127b8d9203d7ce852d103ff1686621f9aca292f (diff)
downloadrails-7ebfb319ffbfc1f9d3dc5439052ae06019bf4290.tar.gz
rails-7ebfb319ffbfc1f9d3dc5439052ae06019bf4290.tar.bz2
rails-7ebfb319ffbfc1f9d3dc5439052ae06019bf4290.zip
Enable `Lint/ErbNewArguments` cop to avoid the deprecated arguments warning
Related 5754a29a974d31cab2b4392716b9825a3d910a69. And follows Ruby standard library style https://github.com/ruby/ruby/commit/3406c5d.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index 2fdcea9d12..82d1fb6a68 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -314,8 +314,7 @@ task :announce do
require "erb"
template = File.read("../tasks/release_announcement_draft.erb")
- match = ERB.version.match(/\Aerb\.rb \[(?<version>[^ ]+) /)
- if match && match[:version] >= "2.2.0" # Ruby 2.6+
+ if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
puts ERB.new(template, trim_mode: "<>").result(binding)
else
puts ERB.new(template, nil, "<>").result(binding)