tmm1 / rbtrace

like strace, but for ruby code
MIT License
1.71k stars 65 forks source link

fix: const name from RbTrace to RBTrace #93

Closed k0i closed 11 months ago

k0i commented 11 months ago

Background

I noticed rbtrace throws the following error:

*** run `sudo sysctl kernel.msgmnb=1048576` to prevent losing events (currently: 16384 bytes)
/home/koyam/.rbenv/versions/debug/lib/ruby/gems/3.3.0+0/gems/rbtrace-0.5.0/lib/rbtrace/rbtracer.rb:326:in `send_cmd': uninitialized constant RBTracer::RbTrace (NameError)

      if msg.bytesize >= RbTrace::BUF_SIZE
                         ^^^^^^^
        from /home/koyam/.rbenv/versions/debug/lib/ruby/gems/3.3.0+0/gems/rbtrace-0.5.0/lib/rbtrace/rbtracer.rb:210:in `attach'
        from /home/koyam/.rbenv/versions/debug/lib/ruby/gems/3.3.0+0/gems/rbtrace-0.5.0/lib/rbtrace/rbtracer.rb:91:in `initialize'
        from /home/koyam/.rbenv/versions/debug/lib/ruby/gems/3.3.0+0/gems/rbtrace-0.5.0/lib/rbtrace/cli.rb:428:in `new'
        from /home/koyam/.rbenv/versions/debug/lib/ruby/gems/3.3.0+0/gems/rbtrace-0.5.0/lib/rbtrace/cli.rb:428:in `run'
        from /home/koyam/.rbenv/versions/debug/lib/ruby/gems/3.3.0+0/gems/rbtrace-0.5.0/bin/rbtrace:5:in `<top (required)>'
        from /home/koyam/.rbenv/versions/debug/bin/rbtrace:25:in `load'
        from /home/koyam/.rbenv/versions/debug/bin/rbtrace:25:in `<main>'

So, I checked the latest commit.

I realized that the commit contains RBTrace and RbTrace, and the correct variant is RBTrace.

Снимок экрана_2023-12-15_03-17-59

Notes

After fixing that, it works. Снимок экрана_2023-12-15_03-21-05

tmm1 commented 11 months ago

Thank you!