made initial_session_setup test for initial_session? inside itself
This commit is contained in:
parent
4212baca6d
commit
7cc5176d93
|
@ -77,6 +77,9 @@ class Pry
|
||||||
# Including: loading .pryrc, loading plugins, loading requires, and
|
# Including: loading .pryrc, loading plugins, loading requires, and
|
||||||
# loading history.
|
# loading history.
|
||||||
def self.initial_session_setup
|
def self.initial_session_setup
|
||||||
|
|
||||||
|
return if !initial_session?
|
||||||
|
|
||||||
# note these have to be loaded here rather than in pry_instance as
|
# note these have to be loaded here rather than in pry_instance as
|
||||||
# we only want them loaded once per entire Pry lifetime, not
|
# we only want them loaded once per entire Pry lifetime, not
|
||||||
# multiple times per each new session (i.e in debugging)
|
# multiple times per each new session (i.e in debugging)
|
||||||
|
@ -98,9 +101,7 @@ class Pry
|
||||||
# Pry.start(Object.new, :input => MyInput.new)
|
# Pry.start(Object.new, :input => MyInput.new)
|
||||||
def self.start(target=TOPLEVEL_BINDING, options={})
|
def self.start(target=TOPLEVEL_BINDING, options={})
|
||||||
target = Pry.binding_for(target)
|
target = Pry.binding_for(target)
|
||||||
if initial_session?
|
initial_session_setup
|
||||||
initial_session_setup
|
|
||||||
end
|
|
||||||
|
|
||||||
Pry.config.hooks.exec_hook(:when_started, target)
|
Pry.config.hooks.exec_hook(:when_started, target)
|
||||||
new(options).repl(target)
|
new(options).repl(target)
|
||||||
|
|
Loading…
Reference in New Issue