diff --git a/lib/debug/thread_client.rb b/lib/debug/thread_client.rb index 5f2d1001a..79d53e474 100644 --- a/lib/debug/thread_client.rb +++ b/lib/debug/thread_client.rb @@ -643,7 +643,8 @@ def show_by_editor path = nil if editor = (ENV['RUBY_DEBUG_EDITOR'] || ENV['EDITOR']) puts "command: #{editor}" puts " path: #{path}" - system(editor, path) + require 'shellwords' + system(*Shellwords.split(editor), path) else puts "can not find editor setting: ENV['RUBY_DEBUG_EDITOR'] or ENV['EDITOR']" end