summaryrefslogtreecommitdiff
path: root/tool/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lib')
-rw-r--r--tool/lib/_tmpdir.rb6
-rw-r--r--tool/lib/envutil.rb10
2 files changed, 8 insertions, 8 deletions
diff --git a/tool/lib/_tmpdir.rb b/tool/lib/_tmpdir.rb
index fd429dab37..daa1a1f235 100644
--- a/tool/lib/_tmpdir.rb
+++ b/tool/lib/_tmpdir.rb
@@ -4,11 +4,11 @@ template = "rubytest."
# Assume the directory by these environment variables are safe.
base = [ENV["TMPDIR"], ENV["TMP"], "/tmp"].find do |tmp|
next unless tmp and tmp.size <= 50 and File.directory?(tmp)
- # On macOS, the default TMPDIR is very long, inspite of UNIX socket
- # path length is limited.
+ # On macOS, the default TMPDIR is very long, in spite of UNIX socket
+ # path length being limited.
#
# Also Rubygems creates its own temporary directory per tests, and
- # some tests copy the full path of gemhome there. In that caes, the
+ # some tests copy the full path of gemhome there. In that case, the
# path contains both temporary names twice, and can exceed path name
# limit very easily.
tmp
diff --git a/tool/lib/envutil.rb b/tool/lib/envutil.rb
index 573fd5122c..101ea350c6 100644
--- a/tool/lib/envutil.rb
+++ b/tool/lib/envutil.rb
@@ -98,7 +98,7 @@ module EnvUtil
def start(pid, *args) end
def dump(pid, timeout: 60, reprieve: timeout&.div(4))
- dpid = start(pid, *command_file(File.join(__dir__, "dump.#{name}")))
+ dpid = start(pid, *command_file(File.join(__dir__, "dump.#{name}")), out: :err)
rescue Errno::ENOENT
return
else
@@ -121,8 +121,8 @@ module EnvUtil
register("gdb") do
class << self
def usable?; system(*%w[gdb --batch --quiet --nx -ex exit]); end
- def start(pid, *args)
- spawn(*%w[gdb --batch --quiet --pid #{pid}], *args)
+ def start(pid, *args, **opts)
+ spawn(*%W[gdb --batch --quiet --pid #{pid}], *args, **opts)
end
def command_file(file) "--command=#{file}"; end
end
@@ -131,8 +131,8 @@ module EnvUtil
register("lldb") do
class << self
def usable?; system(*%w[lldb -Q --no-lldbinit -o exit]); end
- def start(pid, *args)
- spawn(*%w[lldb --batch -Q --attach-pid #{pid}])
+ def start(pid, *args, **opts)
+ spawn(*%W[lldb --batch -Q --attach-pid #{pid}], *args, **opts)
end
def command_file(file) ["--source", file]; end
end