Last active
March 29, 2020 02:45
-
-
Save atton/9ac15fafb66fc0cc9971784f0afc9bc8 to your computer and use it in GitHub Desktop.
gist for https://attonblog.blogspot.com/2020/03/set-pry-history-file-with-backward-compatibility.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error loading /root/.config/pry/pryrc: undefined method `file=' for #<Pry::History:0x00005624d9ce6298> | |
Did you mean? filter | |
/root/.config/pry/pryrc:1:in `__pry__' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@history_path = File.expand_path('path/to/history') | |
if Pry.config.respond_to?(:history_file=) | |
Pry.config.history_file = @history_path.clone | |
else | |
Pry.config.history.file = @history_path.clone | |
end | |
remove_instance_variable(:@history_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pry.config.history.file = File.expand_path('path/to/history') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead | |
/usr/local/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb:40: warning: in `eval' | |
<main>:1: warning: __LINE__ in eval may not return location in binding; use Binding#source_location instead | |
/usr/local/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb:41: warning: in `eval' | |
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead | |
/usr/local/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb:88: warning: in `eval' | |
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead | |
/usr/local/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb:80: warning: in `eval' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment