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

Rename repl to loop

This commit is contained in:
Ryan Fitzgerald 2012-12-27 22:10:44 -08:00
parent 1ea1927b43
commit 9fc0ee5a46

View file

@ -21,16 +21,15 @@ class Pry
end
def start
repl_prologue
repl
prologue
loop
ensure
repl_epilogue
epilogue
end
private
def repl_prologue
def prologue
pry.exec_hook :before_session, pry.output, pry.current_binding, pry
# Clear the line before starting Pry. This fixes the issue discussed here:
# https://github.com/pry/pry/issues/566
@ -39,8 +38,8 @@ class Pry
end
end
def repl
loop do
def loop
super do # haha
case val = retrieve_line
when :control_c
output.puts ""
@ -56,7 +55,7 @@ class Pry
end
# Clean-up after the repl session.
def repl_epilogue
def epilogue
pry.exec_hook :after_session, pry.output, pry.current_binding, pry
Pry.save_history if Pry.config.history.should_save