<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>m_seki</author_name>
  <author_url>https://blog.hatena.ne.jp/m_seki/</author_url>
  <blog_title>@m_seki の</blog_title>
  <blog_url>https://druby.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>knuさんがついーとしてた。sort_byしてrevese_eachでも良さそうな気がするけど、パズルとしておもしろげ。 sort_byのブロックは比較してほしいオブジェクトを返す係なので、比較結果の符号を反転するオブジェクトを返せばできそう。が、集合の要素ごとにオブジェクトが一つできちゃうのがとてもダメだと思う。あー。反転というよりも、比較する順序が逆なんだよってしたほうが直感的!? def &lt;=&gt;(other) other.value &lt;=&gt; @value end 追記 せっかくなので化粧箱（Enumerable）に入れてみた。本質から離れていく‥。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdruby.hatenablog.com%2Fentry%2F20100430%2F1272566801&quot; title=&quot;reverse_sort_by - @m_seki の&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-04-30 03:46:41</published>
  <title>reverse_sort_by</title>
  <type>rich</type>
  <url>https://druby.hatenablog.com/entry/20100430/1272566801</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
