Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task.clear does not remove parameters #156

Closed
jessebs opened this issue Aug 25, 2016 · 1 comment
Closed

Task.clear does not remove parameters #156

jessebs opened this issue Aug 25, 2016 · 1 comment

Comments

@jessebs
Copy link

jessebs commented Aug 25, 2016

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)

hsbt added a commit that referenced this issue Aug 26, 2016
@hsbt
Copy link
Member

hsbt commented Aug 27, 2016

Fixed at #157

@hsbt hsbt closed this as completed Aug 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants