diff options
author | Nuno Silva <[email protected]> | 2024-02-06 16:46:41 +0000 |
---|---|---|
committer | git <[email protected]> | 2024-02-06 16:46:50 +0000 |
commit | 300dee1fe8275b7444007b418323544b571f585c (patch) | |
tree | 96c09964d8b53b7ee38f7c1f6b4e7e39424cb7b6 /lib/irb/context.rb | |
parent | 26fac8f6fa8bf73e5f45c3028cd5bc186d89f666 (diff) |
[ruby/irb] Fix usage of tracer gem and add tests
(https://github.com/ruby/irb/pull/857)
The new tests are skipped when ruby below 3.1, as it was a default gem on it, and in a version we do not support.
This also move definition of `use_tracer` to module Context instead of monkey patch.
https://github.com/ruby/irb/commit/08834fbd5f
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r-- | lib/irb/context.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index ac61b765c0..5b8791c3ba 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -161,6 +161,11 @@ module IRB private_constant :KEYWORD_ALIASES + def use_tracer=(val) + require_relative "ext/tracer" + @use_tracer = val + end + private def build_completor completor_type = IRB.conf[:COMPLETOR] case completor_type |