about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-01-01 03:33:53 +0000
committerEric Wong <e@80x24.org>2017-01-01 03:33:53 +0000
commitb6bb20b380cf29acfccb87afcc65fba30cdcbf7a (patch)
treefb56571aafdcd9adec725ec3a1cadea62809013c
parent76c10dada86fd807d36ccafca393e945e381696a (diff)
downloadmsgthr-b6bb20b380cf29acfccb87afcc65fba30cdcbf7a.tar.gz
Not really a problem, but it is shorter and lighter.
-rw-r--r--test/test_msgthr.rb2
1 files changed, 1 insertions, 1 deletions
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)