Skip to content

Fix instance variable @current_frame_index not initialized warning #631

@bkuhlmann

Description

@bkuhlmann

Your environment

  • ruby -v: ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21.4.0]
  • rdbg -v: rdbg 1.5.0

Describe the bug

With the upgrade from 1.4.0 to 1.5.0, I'm seeing a screen full of these warnings show up in my logs and test suite:

/Users/bkuhlmann/.cache/frum/versions/2.7.6/lib/ruby/gems/2.7.0/gems/debug-1.5.0/lib/debug/thread_client.rb:468: warning: instance variable @current_frame_index not initialized

To Reproduce

To reproduce, save this script as demo_spec.rb and run as rspec demo_spec.rb:

require "bundler/inline"

gemfile true do
  source "https://rubygems.org"

  gem "debug", "~> 1.5"
  gem "rspec"
end

RSpec.configure do |config|
  config.warnings = true
end

When you run this using Ruby 2.7.6 + Debug 1.5.0, you'll get the warning reported above. If you run the same script using Debug 1.4.0, the warning goes away.

Expected behavior

I'd like to see the warning resolved so my console remains clean. Like it was with Debug 1.4.0. This is not an issue when using Ruby 3.1.2 or higher with Debug 1.5.0.

Additional context

Normally, I'd not report this since I'm generally using the latest version of Ruby and the Debug gem but since I'm working on client code that is several years behind, I'm seeing this issue crop up. Again, this doesn't happen with Ruby 3.1.2 + Debug 1.5.0 only with Ruby 2.7.x + Debug 1.5.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions