You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the original trap code can accept Integer, the above can't.
To Reproduce
irb(main):001:0> require 'debug'
=> true
irb(main):002:0> trap(3,1)
/usr/local/bundle/gems/debug-1.7.2/lib/debug/session.rb:2520:in `trap': undefined method `to_sym' for 3:Integer (NoMethodError)
case sig&.to_sym
^^^^^^^^
Did you mean? to_s
from (irb):2:in `<main>'
from /usr/local/bundle/gems/irb-1.6.4/exe/irb:9:in `<top (required)>'
from /usr/local/bundle/bin/irb:25:in `load'
from /usr/local/bundle/bin/irb:25:in `<main>'
Expected behavior
trace method should accept number as first argument.
The text was updated successfully, but these errors were encountered:
Your environment
ruby -v
: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]rdbg -v
: rdbg 1.7.2Describe the bug
In the following code, Signal.#trap method is overridden.
https://github.com/ruby/debug/blob/v1.7.2/lib/debug/session.rb#L2520
Although the original trap code can accept Integer, the above can't.
To Reproduce
Expected behavior
trace method should accept number as first argument.
The text was updated successfully, but these errors were encountered: