mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 6 additions and 0 deletions
|
@ -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>
|
||||
|
||||
* lib/base64.rb: enclosed in a module. [ruby-core:02285]
|
||||
|
|
|
@ -117,6 +117,7 @@ def merge_libs(*libs)
|
|||
libs.inject([]) do |x, y|
|
||||
xy = x & y
|
||||
xn = yn = 0
|
||||
y = y.inject([]) {|ary, e| ary.last == e ? ary : ary << e}
|
||||
y.each_with_index do |v, yi|
|
||||
if xy.include?(v)
|
||||
xi = [x.index(v), xn].max()
|
||||
|
|
Loading…
Reference in a new issue