diff --git a/lib/pry/config.rb b/lib/pry/config.rb index 338c91ac..eab4a287 100644 --- a/lib/pry/config.rb +++ b/lib/pry/config.rb @@ -75,9 +75,9 @@ class Pry # sub-options include hist.file, hist.load, and hist.save # hist.file is the file to save/load history too, e.g # Pry.config.history.file = "~/.pry_history". - # hist.load is a boolean that determines whether history will be + # hist.should_load is a boolean that determines whether history will be # loaded from hist.file at session start. - # hist.save is a boolean that determines whether history will be + # hist.should_save is a boolean that determines whether history will be # saved to hist.file at session end. # @return [OpenStruct] attr_accessor :history diff --git a/lib/pry/pry_class.rb b/lib/pry/pry_class.rb index 0d2b7de1..399657eb 100644 --- a/lib/pry/pry_class.rb +++ b/lib/pry/pry_class.rb @@ -97,7 +97,7 @@ class Pry # multiple times per each new session (i.e in debugging) load_rc if Pry.config.should_load_rc load_plugins if Pry.config.plugins.enabled - load_history if Pry.config.history.instance_variable_get("@table")[:load] + load_history if Pry.config.history.should_load #.instance_variable_get("@table")[:load] @initial_session = false end @@ -196,8 +196,8 @@ class Pry config.plugins.strict_loading = true config.history ||= OpenStruct.new - config.history.save = true - config.history.load = true + config.history.should_save = true + config.history.should_load = true config.history.file = File.expand_path("~/.pry_history") config.memory_size = 100 diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 306c8043..a0db5c8e 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -149,7 +149,7 @@ class Pry throw :breakout, break_data end - save_history if Pry.config.history.save && finished_top_level_session? + save_history if Pry.config.history.should_save && finished_top_level_session? return_value end diff --git a/test/test_pry.rb b/test/test_pry.rb index 5772aed8..c0a93533 100644 --- a/test/test_pry.rb +++ b/test/test_pry.rb @@ -1,4 +1,4 @@ -require 'helper' +require File.dirname(File.expand_path(__FILE__)) + '/helper' puts "Ruby Version #{RUBY_VERSION}" puts "Testing Pry #{Pry::VERSION}"