mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Changing Pry.config.history.load/save into should_load/should_save to work aroung ActiveSupport 3.1.rc2 hijacking "load"
Changing test_pry.rb to require 'helper' using absolute path, so we can run tests under 1.9.2+
This commit is contained in:
parent
6d1f537c22
commit
34f85aa3a9
4 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'helper'
|
||||
require File.dirname(File.expand_path(__FILE__)) + '/helper'
|
||||
|
||||
puts "Ruby Version #{RUBY_VERSION}"
|
||||
puts "Testing Pry #{Pry::VERSION}"
|
||||
|
|
Loading…
Reference in a new issue