Skip to content

Instantly share code, notes, and snippets.

View matz's full-sized avatar

Yukihiro "Matz" Matsumoto matz

  • Ruby Association,NaCl
  • Matsue, Japan
View GitHub Profile
@matz
matz / memsize.diff
Created July 19, 2020 22:11
I separated `ObjectSpace#memsize_of` into a independent gem
commit a2800cff55c1c95ccf8ffd0a8023baaf32fecabd
Author: Yukihiro "Matz" Matsumoto <[email protected]>
Date: 2020-07-20 07:05:27 +0900
Separate `memsize_of` and `memsize_of_all` to a separate gem; #5040
Those methods are originally CRuby specific.
diff --git a/mrbgems/mruby-objectspace/mrbgem.rake b/mrbgems/mruby-objectspace/mrbgem.rake
index 101e2427..fa35136a 100644
@matz
matz / gist:0cb6b7374d7fdc8f5dc50b3fb4aad059
Created August 7, 2019 08:15
mruby-require mruby 2.x 用パッチ
diff --git a/src/mrb_require.c b/src/mrb_require.c
index a14a497..41bf951 100644
--- a/src/mrb_require.c
+++ b/src/mrb_require.c
@@ -33,6 +33,15 @@
#include <dlfcn.h>
#endif
+#ifndef RSTRING_CSTR
+static const char*
@matz
matz / btree.rb
Last active December 29, 2015 07:59
どこかでみかけたHaskell版から翻訳してみた。Haskellの方がコンパクト。あと型チェックはないよね。
class Leaf
def initialize(n)
@value = n
end
def value
@value
end
def size
1
end
@matz
matz / list of old ruby tar balls
Created May 31, 2013 16:27
私のPCにあった過去のRubyのtarballのリスト
ruby-1.0-970819.tar.gz
ruby-1.0-970820.tar.gz
ruby-1.0-970821.tar.gz
ruby-1.0-970903.tar.gz
ruby-1.0-970908.tar.gz
ruby-1.0-970909.tar.gz
ruby-1.0-970910.tar.gz
ruby-1.0-970911.tar.gz
ruby-1.0-970919.tar.gz
ruby-1.0-970930.tar.gz
@matz
matz / de.yml
Created October 18, 2012 13:59 — forked from newstler/de.yml
#iOSonRailsConf 2013 web site translations
##############################
##############################
robot_in_the_cloak: "Roboter im Regenmantel"
site_title: "#iOSonRailsConf 2013"
site_description: "Alushta Konferenz für Ruby on Rails und iOS-Entwickler aus aller Welt, die im Frühjahr 2013 stattfinden wird."
site_description_short: "Ruby on Rails und iOS-Entwickler Alushta Konferenz 2013."
site_keywords: "Ruby, Rails, ios, Entwickler, Konferenz, 2013, Web, Handy, iphone, ipad, ipod"
@matz
matz / gist:3066997
Created July 7, 2012 16:00
code to migrate between 2 mrb_state
#include "mruby.h"
#include "mruby/string.h"
#include "mruby/array.h"
mrb_value
migrate_simple_value(mrb_state *mrb, mrb_value v, mrb_state *mrb2)
{
mrb_value nv; /* new value */
const char *s;
int len;