Task.clear does not remove the handling of parameters. This can easily be seen by the following example: `desc 'Original Test Task'` `task :test, [:param] do; end` ` ` `Rake::Task[:test].clear` `desc 'Replaced Test Task'` `task :test do; end` rake -T yields > rake test[param] # Replaced Test Task Adding the following after the call to clear corrects it, so clear just needs to remove the params `Rake::Task[:test].instance_variable_set(:@arg_names, nil)`