msgthr user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
* [PATCH] test: use symproc in test
@ 2017-01-01  3:34 Eric Wong
  0 siblings, 0 replies; only message in thread
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	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01  3:34 [PATCH] test: use symproc in test Eric Wong

msgthr user+dev discussion/patches/pulls/bugs/help

Archives are clonable: git clone --mirror https://80x24.org/msgthr-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.msgthr
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.msgthr

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox