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

Native api fix rdebug recursion alt #1205

Merged
merged 5 commits into from
Nov 13, 2020

Conversation

iMacTia
Copy link
Member

@iMacTia iMacTia commented Nov 12, 2020

Description

Adds commit on top of #1204

Todos

List any remaining work that needs to be done, i.e:

  • Test with ruby-debug

native-api and others added 4 commits November 11, 2020 01:45
When running with `ruby -rdebug` with a breakpoint set, `self.to_str` (which is not defined) is called repeatedly during module load, including the time after the `class << self` block is loaded but before further blocks that add more bits to `self` are.
As such, the dynamic method resolution machinery has to not break in this partially initialized state.
May break something due to submodules being loaded early
@native-api
Copy link

A way to test with -rdebug is:

$ bundle exec ruby -rdebug -e "require 'faraday'; puts Faraday::VERSION;" <<!
b foo:1
c
!

@native-api
Copy link

I confirm the PR to work:

bundle exec ruby -rdebug -e "require 'faraday'; puts Faraday::VERSION;" <<!
b foo:1
c
!
/home/vmuser/.rvm/rubies/ruby-2.5.8/lib/ruby/2.5.0/x86_64-linux/continuation.so: warning: callcc is obsolete; use Fiber instead
Debug.rb
Emacs support available.

/home/vmuser/.rvm/rubies/ruby-2.5.8/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:35:    RUBYGEMS_ACTIVATION_MONITOR.enter
(rdb:1) b foo:1
Set breakpoint 1 at foo:1
(rdb:1) c
1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants