Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Takashi Kokubun
    @k0kubun
    Hi :smile:
    David Rodríguez
    @deivid-rodriguez
    Hi!
    I figured this would be faster! :)
    Takashi Kokubun
    @k0kubun
    :+1:
    David Rodríguez
    @deivid-rodriguez
    So I was asking for the purpose of that commit, since removing it doesn't affect the test suite
    Takashi Kokubun
    @k0kubun
    Without the commit, I can't stop Byebug when I exit debugger with Control-D.
    Instead of typing "c" and pressing Enter, I often use Control-D to exit REPL.
    David Rodríguez
    @deivid-rodriguez
    aaaaaaaah! I get it now!
    Takashi Kokubun
    @k0kubun
    :)
    David Rodríguez
    @deivid-rodriguez
    I never used Control-D like that
    Takashi Kokubun
    @k0kubun
    I see
    David Rodríguez
    @deivid-rodriguez
    Now I understand the commit.
    Takashi Kokubun
    @k0kubun
    That's a good news for me. It it acceptable?
    David Rodríguez
    @deivid-rodriguez
    Yes, it is.
    Takashi Kokubun
    @k0kubun
    :tada:
    David Rodríguez
    @deivid-rodriguez
    I'd like a test for this Control-D behavior, but I don't think it is necessary here, since the behavior has always been there.
    Takashi Kokubun
    @k0kubun
    I want a test for it too. Writing it is hard but I can add a unit test to ensure "continue" is returned when Readline.readline returns nil.
    Since continue's behavior is already tested, I think it'll be enough.
    David Rodríguez
    @deivid-rodriguez
    Don't worry about it, at least not in this PR.
    Takashi Kokubun
    @k0kubun
    Thanks!
    David Rodríguez
    @deivid-rodriguez
    Thanks to you!
    Takashi Kokubun
    @k0kubun
    I investigated why tests randomly crash and noticed that tracepoint's hooks are unexpectedly xfreed.
    I could manage to create the fix for it in ruby/ruby#1059, and I've never seen the SEGV with Ruby complied with the patch.
    David Rodríguez
    @deivid-rodriguez
    @os97673 I've tried to create a regression test for https://bugs.ruby-lang.org/issues/11492, but couldn't find a simple ruby code that reproduces the issue. Not really a big deal, but any ideas?
    Oleg Sukhodolsky
    @os97673
    @deivid-rodriguez the problem for debugger is that it incorrectly count stack size and stops in the wrong place, so the test should do something like
    stop at some point, do step over (I believe this is next in byebug's terms)
    and stops in wrong place
    the code should be something like
    class A
      define_method "method1" do
        return 1
      end
    
      def foo
        method1 # suspect we may stop here instead
      end
    end
    A.new.foo # breakpoint (stops here)
    puts '1' # after step over should should stop here
    Oleg Sukhodolsky
    @os97673
    I have not tried but hope it illustrates the idea
    David Rodríguez
    @deivid-rodriguez
    yes, that's what I've been trying but I haven't found a failing test case. I know it involves define_method but it's definitely not that simple. Your example passes against all supported versions in byebug.
    Oleg Sukhodolsky
    @os97673
    Perhaps you need add more code in foo after method1 call, to have line event to stop at.
    If this doesn't work could you please create a branch with the test and I will play with it.
    David Rodríguez
    @deivid-rodriguez
    @os97673 Your suggestion worked! Thanks!
    But now there's one concern. I thought it was a regression in 2.2.3 that didn't affect 2.1, but it fails in 2.1 too. In that case, we would need to ask for a backport. Can you confirm?
    David Rodríguez
    @deivid-rodriguez
    Oleg Sukhodolsky
    @os97673
    I have never tested it with 2.1 because user has not complained about it :)
    And, unfortunately, I don't have test for this :(