optimize Runtime.default_paths slightly
This commit is contained in:
parent
5c9cc2223e
commit
4431cf4b29
@ -33,10 +33,13 @@ module Runtime
|
|||||||
#
|
#
|
||||||
# @return [Array] Default runtime paths.
|
# @return [Array] Default runtime paths.
|
||||||
def default_paths
|
def default_paths
|
||||||
[
|
paths = []
|
||||||
File.expand_path("~/.jes"),
|
user_path = File.expand_path("~/.jes")
|
||||||
File.expand_path("../../runtime", $0),
|
if File.directory?(user_path)
|
||||||
]
|
paths << user_path
|
||||||
|
end
|
||||||
|
paths << File.expand_path("../../runtime", $0)
|
||||||
|
paths
|
||||||
end
|
end
|
||||||
|
|
||||||
# Find a runtime file within a single runtime path.
|
# Find a runtime file within a single runtime path.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user