1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

first attempt at editor support for jruby

This commit is contained in:
John Mair 2011-09-07 03:00:31 +12:00
parent f8624252d2
commit 5b48284a9f

View file

@ -357,7 +357,13 @@ class Pry
editor_invocation = "#{Pry.config.editor} #{start_line_syntax_for_editor(file, line)}"
end
run ".#{editor_invocation}"
if jruby?
require 'spoon'
pid = Spoon.spawnp(*editor_invocation.split)
Process.waitpid(pid)
else
run ".#{editor_invocation}"
end
end
def start_line_syntax_for_editor(file_name, line_number)