1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Merge pull request #1827 from pry/initial-pwd-refactoring

pry: move INITIAL_PWD to code/code_file
This commit is contained in:
Kyrylo Silin 2018-10-28 05:00:20 +08:00 committed by GitHub
commit a1d52a427a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -122,10 +122,6 @@ class Pry
end
end
# Store the current working directory. This allows show-source etc. to work if
# your process has changed directory since boot. [Issue #675]
INITIAL_PWD = Dir.pwd
# This is to keep from breaking under Rails 3.2 for people who are doing that
# IRB = Pry thing.
module ExtendCommandBundle; end

View file

@ -25,6 +25,10 @@ class Pry
%w(Gemfile Rakefile Guardfile Capfile) => :ruby
}
# Store the current working directory. This allows show-source etc. to work if
# your process has changed directory since boot. [Issue #675]
INITIAL_PWD = Dir.pwd
# @return [Symbol] The type of code stored in this wrapper.
attr_reader :code_type
@ -95,7 +99,7 @@ class Pry
# @return [String]
def from_pry_init_pwd
File.expand_path(@filename, Pry::INITIAL_PWD)
File.expand_path(@filename, INITIAL_PWD)
end
# @return [String]