From 3948349a82a2522f1d8293093164ef395bee542d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 11 Mar 2016 12:11:37 +0900 Subject: [PATCH] Revert to removing `last_comment` and deprecate it --- lib/rake/task_manager.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 202a8a688..e13482401 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -5,6 +5,19 @@ module TaskManager # Track the last comment made in the Rakefile. attr_accessor :last_description + # Remove Rake 12 + def last_comment # :nodoc: + warn "[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead." + @last_description + end + + # Remove Rake 12 + def last_comment=(comment) # :nodoc: + warn "[DEPRECATION] `last_comment=` is deprecated. Please use `last_description=` instead." + @last_description = comment + @last_description # ignore warning + end + def initialize # :nodoc: super @tasks = Hash.new