* lib/mkmf.rb (merge_libs): squeeze successive same libraries.
[ruby-dev:22652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b89f4520e5
commit
f3e0252e5e
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jan 21 16:44:15 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/mkmf.rb (merge_libs): squeeze successive same libraries.
|
||||||
|
[ruby-dev:22652]
|
||||||
|
|
||||||
Wed Jan 21 16:10:36 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jan 21 16:10:36 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/base64.rb: enclosed in a module. [ruby-core:02285]
|
* lib/base64.rb: enclosed in a module. [ruby-core:02285]
|
||||||
|
@ -117,6 +117,7 @@ def merge_libs(*libs)
|
|||||||
libs.inject([]) do |x, y|
|
libs.inject([]) do |x, y|
|
||||||
xy = x & y
|
xy = x & y
|
||||||
xn = yn = 0
|
xn = yn = 0
|
||||||
|
y = y.inject([]) {|ary, e| ary.last == e ? ary : ary << e}
|
||||||
y.each_with_index do |v, yi|
|
y.each_with_index do |v, yi|
|
||||||
if xy.include?(v)
|
if xy.include?(v)
|
||||||
xi = [x.index(v), xn].max()
|
xi = [x.index(v), xn].max()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user