Author: aschnell Date: Thu Aug 23 17:08:23 2007 New Revision: 6845 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6845&view=rev Log: - use new to_a functions Modified: trunk/libzypp-testsuite/pokus/src/testsuite.rb Modified: trunk/libzypp-testsuite/pokus/src/testsuite.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/pokus/src/testsuite.rb?rev=6845&r1=6844&r2=6845&view=diff ============================================================================== --- trunk/libzypp-testsuite/pokus/src/testsuite.rb (original) +++ trunk/libzypp-testsuite/pokus/src/testsuite.rb Thu Aug 23 17:08:23 2007 @@ -69,17 +69,9 @@ end - # TODO: can't this be done more elegant? - # Maybe define to_a functions. - def Testsuite.haha1(x) - y = Array.new - x.each {|z| y << z} - return y.sort - end - + # TODO: better name def Testsuite.haha2(x) - y = Array.new - x.each {|z| y << z} + y = x.to_a y.map! {|a| a.resolvable} return y.sort end @@ -87,7 +79,7 @@ def Testsuite.dump_deps(res, kind) deps = res.dep(kind) - Testsuite.haha1(deps).each do |dep| + deps.to_a.sort.each do |dep| case kind.in_switch when Dep.PROVIDES.in_switch : puts " Provides: #{dep.to_s}" when Dep.PREREQUIRES.in_switch : puts " Prerequires: #{dep.to_s}" -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org