msgthr user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] test: use symproc in test
@ 2017-01-01  3:34  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2017-01-01  3:34 UTC (permalink / raw)
  To: msgthr-public

Not really a problem, but it is shorter and lighter.
---
 test/test_msgthr.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_msgthr.rb b/test/test_msgthr.rb
index 2e398c1..19441c8 100644
--- a/test/test_msgthr.rb
+++ b/test/test_msgthr.rb
@@ -12,7 +12,7 @@ class TestMsgthr < Test::Unit::TestCase
     thr.add('D', nil, 'D')
     thr.add('d', nil, 'd')
     thr.thread!
-    rootset = thr.order! { |c| c.sort! { |a, b| a.mid <=> b.mid } }
+    rootset = thr.order! { |c| c.sort_by!(&:mid) }
     assert_equal %w(D c d), rootset.map(&:mid)
     assert_equal 'D', rootset[0].msg
     assert_equal %w(b), rootset[1].children.map(&:mid)
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-01-01  3:34  7% [PATCH] test: use symproc in test Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/msgthr.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).