mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Prefer flat_map
This commit is contained in:
parent
a5baf8d6bc
commit
30268d1de6
1 changed files with 2 additions and 2 deletions
|
@ -285,7 +285,7 @@ MESSAGE
|
||||||
|
|
||||||
def split_libs(*strs)
|
def split_libs(*strs)
|
||||||
sep = $mswin ? /\s+/ : /\s+(?=-|\z)/
|
sep = $mswin ? /\s+/ : /\s+(?=-|\z)/
|
||||||
strs.map {|s| s.lstrip.split(sep)}.flatten
|
strs.flat_map {|s| s.lstrip.split(sep)}
|
||||||
end
|
end
|
||||||
|
|
||||||
def merge_libs(*libs)
|
def merge_libs(*libs)
|
||||||
|
@ -1083,7 +1083,7 @@ SRC
|
||||||
def find_library(lib, func, *paths, &b)
|
def find_library(lib, func, *paths, &b)
|
||||||
dir_config(lib)
|
dir_config(lib)
|
||||||
lib = with_config(lib+'lib', lib)
|
lib = with_config(lib+'lib', lib)
|
||||||
paths = paths.collect {|path| path.split(File::PATH_SEPARATOR)}.flatten
|
paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
|
||||||
checking_for checking_message(func && func.funcall_style, LIBARG%lib) do
|
checking_for checking_message(func && func.funcall_style, LIBARG%lib) do
|
||||||
libpath = $LIBPATH
|
libpath = $LIBPATH
|
||||||
libs = append_library($libs, lib)
|
libs = append_library($libs, lib)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue