<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Gem</anon>
    <anon>Ruby</anon>
  </categories>
  <description>なんと、C拡張でモンキーパッチまで可能だとは！ ここが参考になりました。前記事の C拡張をオープンクラスで実現します。Bundler を使っています。ソースは以下。 #include &quot;utilsc.h&quot; long gcd(long x, long y) { long tmp; if (x &lt; y) {tmp = x; x = y; y = tmp;} if (!y) return x; return gcd(y, x % y); } VALUE totient(VALUE self) { int a; long i, se; a = 0; se = FIX2LONG(self); for (…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F04%2F21%2F034034&quot; title=&quot;Ruby の C拡張でモンキーパッチ（オープンクラス） - Camera Obscura&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>2016-04-21 03:40:34</published>
  <title>Ruby の C拡張でモンキーパッチ（オープンクラス）</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2016/04/21/034034</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
