Skip to content
Browse files

Fix path location for code loader in 1.8 mode to prevent double loading

Fixes #1832
Fixes #1788
Fixes #1571
  • Loading branch information...
1 parent 88c037d commit 61478c8811c666e31398b5e23fb47534452bd5f7 @dbussink dbussink committed with Jul 27, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 kernel/common/codeloader.rb
View
12 kernel/common/codeloader.rb
@@ -257,16 +257,16 @@ def qualified_path?(path)
# name in $LOAD_PATH.
#
# Returns true if a loadable file is found, otherwise returns false.
- def verify_load_path(path, loading=false)
- path = File.expand_path path if home_path? path
+ def verify_load_path(file, loading=false)
+ file = File.expand_path file if home_path? file
- if qualified_path? path
- return false unless loadable? path
+ if qualified_path? file
+ return false unless loadable? file
else
- return false unless path = search_load_path(path, loading)
+ return false unless path = search_load_path(file, loading)
end
- update_paths(path, path)
+ update_paths(file, path || file)
return true
end

0 comments on commit 61478c8

Please sign in to comment.
Something went wrong with that request. Please try again.