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

Pass show_code: false to binding.irb if available #808

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debug.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.extensions = ['ext/debug/extconf.rb']

spec.add_dependency "irb", ">= 1.3.6" # for its color_printer class, which was added after 1.3
spec.add_dependency "irb", ">= 1.5.0" # for binding.irb(show_code: false)
spec.add_dependency "reline", ">= 0.3.1"
end
3 changes: 2 additions & 1 deletion lib/debug/thread_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,9 @@ def wait_next_action_
when :call
result = frame_eval(eval_src)
when :irb
require 'irb' # prelude's binding.irb doesn't have show_code option
begin
result = frame_eval('binding.irb', binding_location: true)
result = frame_eval('binding.irb(show_code: false)', binding_location: true)
ensure
# workaround: https://github.com/ruby/debug/issues/308
Reline.prompt_proc = nil if defined? Reline
Expand Down