optimize Runtime.default_paths slightly

This commit is contained in:
josh committed 2014-07-15 16:19:41 -04:00
1 parent 5c9cc2223e
commit 4431cf4b29
1 file changed
+7 -4
+7 -4
View File
@@ -33,10 +33,13 @@ module Runtime
#
# @return [Array] Default runtime paths.
def default_paths
[
File.expand_path("~/.jes"),
File.expand_path("../../runtime", $0),
]
paths = []
user_path = File.expand_path("~/.jes")
if File.directory?(user_path)
paths << user_path
end
paths << File.expand_path("../../runtime", $0)
paths
end
# Find a runtime file within a single runtime path.