diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 27137a867..933a70744 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1157,13 +1157,6 @@ Style/CharacterLiteral: Style/ClassAndModuleChildren: Enabled: false -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: is_a?, kind_of? -Style/ClassCheck: - Exclude: - - 'lib/redmine/scm/adapters/cvs_adapter.rb' - # Cop supports --auto-correct. Style/ClassMethods: Exclude: diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 9151a4f56..86fc9e6f7 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -340,9 +340,8 @@ module Redmine # convert a date/time into the CVS-format def time_to_cvstime(time) return nil if time.nil? - time = Time.now if (time.kind_of?(String) && time == 'HEAD') - - unless time.kind_of? Time + time = Time.now if (time.is_a?(String) && time == 'HEAD') + unless time.is_a?(Time) time = Time.parse(time) end return time_to_cvstime_rlog(time)