Skip to content

Commit

Permalink
Rename repl to loop
Browse files Browse the repository at this point in the history
  • Loading branch information
rf- committed Dec 28, 2012
1 parent 1ea1927 commit 9fc0ee5
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lib/pry/repl.rb
Expand Up @@ -21,16 +21,15 @@ def initialize(pry, options = {})
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
Expand All @@ -39,8 +38,8 @@ def repl_prologue
end
end

def repl
loop do
def loop
super do # haha
case val = retrieve_line
when :control_c
output.puts ""
Expand All @@ -56,7 +55,7 @@ def repl
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
Expand Down

0 comments on commit 9fc0ee5

Please sign in to comment.