summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstrcmp <28xdb6+fvutuvy4f@grr.la>2016-01-01 17:20:50 +0000
committerstrcmp <28xdb6+fvutuvy4f@grr.la>2016-01-01 17:20:50 +0000
commitf127a5deb3688c0c1a0b8f43ed81dadac44979d1 (patch)
treefc02c5d575a1c566606c3375869e3a730536a258 /lib
parentc584d173a1f880d248e6c478fa8a5580f926f2fa (diff)
downloadpry-f127a5deb3688c0c1a0b8f43ed81dadac44979d1.tar.gz
lazy load Default#gist
Diffstat (limited to 'lib')
-rw-r--r--lib/pry/config/behavior.rb2
-rw-r--r--lib/pry/config/default.rb10
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/pry/config/behavior.rb b/lib/pry/config/behavior.rb
index 04c55d94..150e6bbf 100644
--- a/lib/pry/config/behavior.rb
+++ b/lib/pry/config/behavior.rb
@@ -152,7 +152,7 @@ module Pry::Config::Behavior
last = last.default while last and last.default
last
end
-
+
#
# @return [Hash]
# returns a duplicate copy of the lookup table used by self.
diff --git a/lib/pry/config/default.rb b/lib/pry/config/default.rb
index 8c7a1dfa..e8d69041 100644
--- a/lib/pry/config/default.rb
+++ b/lib/pry/config/default.rb
@@ -112,6 +112,9 @@ class Pry::Config::Default
require "pry/input_completer"
Pry::InputCompleter
},
+ gist: proc {
+ Pry::Config.from_hash(inspecter: proc(&:pretty_inspect))
+ },
exec_string: proc {
""
}
@@ -124,13 +127,6 @@ class Pry::Config::Default
end
private
- # TODO:
- # all of this configure_* stuff is a relic of old code.
- # we should try move this code to being command-local.
- def configure_gist
- self["gist"] = Pry::Config.from_hash(inspecter: proc(&:pretty_inspect))
- end
-
def configure_history
self["history"] = Pry::Config.from_hash "should_save" => true,
"should_load" => true