mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
made initial_session_setup test for initial_session? inside itself
This commit is contained in:
parent
4212baca6d
commit
7cc5176d93
1 changed files with 4 additions and 3 deletions
|
@ -77,6 +77,9 @@ class Pry
|
|||
# Including: loading .pryrc, loading plugins, loading requires, and
|
||||
# loading history.
|
||||
def self.initial_session_setup
|
||||
|
||||
return if !initial_session?
|
||||
|
||||
# note these have to be loaded here rather than in pry_instance as
|
||||
# we only want them loaded once per entire Pry lifetime, not
|
||||
# multiple times per each new session (i.e in debugging)
|
||||
|
@ -98,9 +101,7 @@ class Pry
|
|||
# Pry.start(Object.new, :input => MyInput.new)
|
||||
def self.start(target=TOPLEVEL_BINDING, options={})
|
||||
target = Pry.binding_for(target)
|
||||
if initial_session?
|
||||
initial_session_setup
|
||||
end
|
||||
initial_session_setup
|
||||
|
||||
Pry.config.hooks.exec_hook(:when_started, target)
|
||||
new(options).repl(target)
|
||||
|
|
Loading…
Add table
Reference in a new issue