Skip to content

stack level too deep (SystemStackError) after upgrading from 4.6.1 to 4.6.2 #1520

@knapo

Description

@knapo

Describe the bug
Per 4dc603b#commitcomment-54080150

4.6.2 extends Rake::Task with aliasing execute method. Unfortunately this causes stack level too deep (SystemStackError), when Rake::Task#execute is overridden using #prepend

To Reproduce

Create a Rakefile:

require 'bundler/inline'
require 'rake'

module MyGem
  module Task
    def execute(...)
      # do something
      super(...)
    end
  end
end

Rake::Task.prepend(MyGem::Task)

require 'sentry-ruby'

task(:test) { }

Run rake test

Expected behavior

rake test should not cause SystemStackError

Actual behavior

rake test ends with SystemStackError

Environment

  • Ruby Version: 3.0.2

Metadata

Metadata

Assignees

Labels

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions