From 1af0c46e074e5985738dea7b13fbc13c5244dabc Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 18 Dec 2024 10:48:40 +0900 Subject: [PATCH] `port_range` lvar is not defined --- lib/debug/server.rb | 2 +- test/support/test_case.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/debug/server.rb b/lib/debug/server.rb index 562982296..41f3bca13 100644 --- a/lib/debug/server.rb +++ b/lib/debug/server.rb @@ -402,7 +402,7 @@ def initialize host: nil, port: nil @port_range = if @port.zero? 0 else - port_range_str = (port_range || CONFIG[:port_range] || "0").to_s + port_range_str = (CONFIG[:port_range] || "0").to_s raise "Specify a positive integer <=16 for port range" unless port_range_str.match?(/\A\d+\z/) && port_range_str.to_i <= 16 port_range_str.to_i end diff --git a/test/support/test_case.rb b/test/support/test_case.rb index 5ff8a2e27..2d1d26f96 100644 --- a/test/support/test_case.rb +++ b/test/support/test_case.rb @@ -180,6 +180,9 @@ def setup_remote_debuggee(cmd) msg1 = true when /\ADEBUGGER: wait for debugger connection/ msg2 = true + else + # unknown lines + STDERR.puts "> #{line}" end break if msg1 && msg2