Skip to content

Commit 5b47f6a

Browse files
committed
Revert "Do not use HEAD request if 1 port"
This reverts commit 6571e2a. It contains #1024 accidentally.
1 parent c3d5e8c commit 5b47f6a

File tree

9 files changed

+13
-17
lines changed

9 files changed

+13
-17
lines changed

.github/workflows/protocol.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
ruby-version: ["2.7", "3.0", "3.1", "head", "debug"]
24+
ruby-version: ['2.6', '2.7', '3.0', '3.1', 'head', 'debug']
2525

2626
steps:
2727
- uses: actions/checkout@v4

.github/workflows/ruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
ruby-version: ["2.7", "3.0", "3.1", "3.2", "head", "debug"]
24+
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', 'head', 'debug']
2525

2626
steps:
2727
- uses: actions/checkout@v4

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ config set no_color true
477477
* `RUBY_DEBUG_NO_RELINE` (`no_reline`): Do not use Reline library (default: false)
478478
* `RUBY_DEBUG_NO_HINT` (`no_hint`): Do not show the hint on the REPL (default: false)
479479
* `RUBY_DEBUG_NO_LINENO` (`no_lineno`): Do not show line numbers (default: false)
480-
* `RUBY_DEBUG_IRB_CONSOLE` (`irb_console`): Use IRB as the console (default: false)
481480

482481
* CONTROL
483482
* `RUBY_DEBUG_SKIP_PATH` (`skip_path`): Skip showing/entering frames for given paths

debug.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
1010
spec.description = %q{Debugging functionality for Ruby. This is completely rewritten debug.rb which was contained by the ancient Ruby versions.}
1111
spec.homepage = "https://github.com/ruby/debug"
1212
spec.licenses = ["Ruby", "BSD-2-Clause"]
13-
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
13+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
1414

1515
spec.metadata["homepage_uri"] = spec.homepage
1616
spec.metadata["source_code_uri"] = spec.homepage
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
2727
spec.require_paths = ["lib"]
2828
spec.extensions = ['ext/debug/extconf.rb']
2929

30-
spec.add_dependency "irb", ">= 1.8.3" # for irb:debug integration
30+
spec.add_dependency "irb", ">= 1.5.0" # for binding.irb(show_code: false)
3131
spec.add_dependency "reline", ">= 0.3.8"
3232
end

lib/debug/client.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,15 @@ def connect_unix name = nil
165165
end
166166
else
167167
Client.cleanup_unix_domain_sockets
168-
files = Client.list_connections
168+
files = Client.list_connections verbose: true
169169

170170
case files.size
171171
when 0
172172
$stderr.puts "No debug session is available."
173173
exit
174174
when 1
175-
@s = Socket.unix(files.first)
175+
@s = Socket.unix(files.first.first)
176176
else
177-
files = Client.list_connections verbose: true
178177
$stderr.puts "Please select a debug session:"
179178
files.each{|(f, desc)|
180179
$stderr.puts " #{File.basename(f)} (#{desc})"

lib/debug/config.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module DEBUGGER__
2222
no_reline: ['RUBY_DEBUG_NO_RELINE', "UI: Do not use Reline library", :bool, "false"],
2323
no_hint: ['RUBY_DEBUG_NO_HINT', "UI: Do not show the hint on the REPL", :bool, "false"],
2424
no_lineno: ['RUBY_DEBUG_NO_LINENO', "UI: Do not show line numbers", :bool, "false"],
25-
irb_console: ["RUBY_DEBUG_IRB_CONSOLE", "UI: Use IRB as the console", :bool, "false"],
2625

2726
# control setting
2827
skip_path: ['RUBY_DEBUG_SKIP_PATH', "CONTROL: Skip showing/entering frames for given paths", :path],

lib/debug/session.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,6 @@ def activate ui = nil, on_fork: false
202202
end
203203
@tp_thread_end.enable
204204

205-
if CONFIG[:irb_console]
206-
require_relative "irb_integration"
207-
thc.activate_irb_integration
208-
end
209-
210205
# session start
211206
q << true
212207
session_server_main

lib/debug/thread_client.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,8 +1048,13 @@ def wait_next_action_
10481048
when :call
10491049
result = frame_eval(eval_src)
10501050
when :irb
1051-
require_relative "irb_integration"
1052-
activate_irb_integration
1051+
require 'irb' # prelude's binding.irb doesn't have show_code option
1052+
begin
1053+
result = frame_eval('binding.irb(show_code: false)', binding_location: true)
1054+
ensure
1055+
# workaround: https://github.com/ruby/debug/issues/308
1056+
Reline.prompt_proc = nil if defined? Reline
1057+
end
10531058
when :display, :try_display
10541059
failed_results = []
10551060
eval_src.each_with_index{|src, i|

test/support/console_test_case.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def prepare_test_environment(program, test_steps, &block)
217217
ENV['RUBY_DEBUG_TEST_UI'] = 'terminal'
218218
ENV['RUBY_DEBUG_NO_RELINE'] = 'true'
219219
ENV['RUBY_DEBUG_HISTORY_FILE'] = ''
220-
ENV['TERM'] = 'dumb'
221220

222221
write_temp_file(strip_line_num(program))
223222
@scenario = []

0 commit comments

Comments
 (0)