Refactor the way commands are required

Fix issue #834 (pry-0.9.11.4 failing on Windows 7 64 bit - cannot load
such file)

The problem was introduced by this commit:
25cbe43137

This bug affects *only* Ruby 1.9.3p327, on Windows.

            Choose your destiny
                    |
    --N00B-----------------------PRO--
    |                                |
  TL;DR:                http://bugs.ruby-lang.org/issues/7374
  File::expand_path
  is bugged on
  Ruby 1.9.3p327

This fix is simply an ugly workaround.
This commit is contained in:
Kyrylo Silin 2013-02-02 17:27:34 +02:00
parent 7aba5c2615
commit 7c8a849fef
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# Default commands used by Pry.
Pry::Commands = Pry::CommandSet.new
Dir[File.expand_path('../commands/*.rb', __FILE__)].each do |file|
Dir[File.expand_path('../commands', __FILE__) + '/*.rb'].each do |file|
require file
end