Skip to content

Task.clear does not remove parameters #156

Closed
@jessebs

Description

@jessebs

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)

Activity

added a commit that references this issue on Aug 26, 2016

Merge pull request #157 from jessebs/master

hsbt

hsbt commented on Aug 27, 2016

@hsbt
Member

Fixed at #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hsbt@jessebs

        Issue actions

          Task.clear does not remove parameters · Issue #156 · ruby/rake