remove String#absolute_path? monkey patch
This commit is contained in:
parent
fa7d17675b
commit
2ffb5d525a
@ -37,4 +37,10 @@ module Rscons
|
|||||||
end
|
end
|
||||||
Cache.clear
|
Cache.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Return whether the given path is an absolute filesystem path or not
|
||||||
|
# @param path [String] the path to examine
|
||||||
|
def self.absolute_path?(path)
|
||||||
|
path =~ %r{^(/|\w:[\\/])}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -111,7 +111,7 @@ module Rscons
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if @build_root and not found_match
|
if @build_root and not found_match
|
||||||
unless source_fname.absolute_path? or build_fname.start_with?("#{@build_root}/")
|
unless Rscons.absolute_path?(source_fname) or build_fname.start_with?("#{@build_root}/")
|
||||||
build_fname = "#{@build_root}/#{build_fname}"
|
build_fname = "#{@build_root}/#{build_fname}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,9 +6,4 @@ class String
|
|||||||
def set_suffix(suffix = '')
|
def set_suffix(suffix = '')
|
||||||
sub(/\.[^.]*$/, suffix)
|
sub(/\.[^.]*$/, suffix)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return whether the string represents an absolute filesystem path
|
|
||||||
def absolute_path?
|
|
||||||
self =~ %r{^(/|\w:[\\/])}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user