<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>babie</author_name>
  <author_url>https://blog.hatena.ne.jp/babie/</author_url>
  <blog_title>babie, you're my home</blog_title>
  <blog_url>https://babie.hatenablog.com/</blog_url>
  <categories>
    <anon>ruby</anon>
    <anon>memo</anon>
  </categories>
  <description>Hash#sort (実際は Enumerable)は、デフォルトで &quot;ORDER BY key&quot; だと嬉しい。よくやる操作だから。 #!/usr/bin/ruby class Symbol def &lt;=&gt; b self.to_s &lt;=&gt; b.to_s end end class Hash alias :default_sort :sort def sort &amp;b unless b.nil? self.default_sort &amp;b else self.to_a.sort { |a,b| a[0] &lt;=&gt; b[0] } end end end h = { :e =&gt; 1, :d =&gt; 2, :…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbabie.hatenablog.com%2Fentry%2F20060215%2Fp4&quot; title=&quot; ハッシュのソート - babie, you&amp;#39;re my home&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>2006-02-15 00:00:03</published>
  <title> ハッシュのソート</title>
  <type>rich</type>
  <url>https://babie.hatenablog.com/entry/20060215/p4</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
