Skip to content

Instantly share code, notes, and snippets.

diff --git a/ChangeLog b/ChangeLog
index 0176047..eeec688 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Apr 25 12:02:42 2010 wanabe <[email protected]>
+
+ * process.c (run_exec_open): move file pointer to avoid msvcrt's bug.
+
@wanabe
wanabe / rbx-hydra-mingw32.patch
Created February 26, 2011 12:03
still SEGV.
commit 34b55803d7da002e0e75a2ac482134c4947508d1
Author: wanabe <[email protected]>
Date: Sat Feb 26 20:44:46 2011 +0900
extension library name is "*.so" on windows.
diff --git a/kernel/common/native_method.rb b/kernel/common/native_method.rb
index 0484f1c..2892f61 100644
--- a/kernel/common/native_method.rb
+++ b/kernel/common/native_method.rb
@wanabe
wanabe / rbx-hydra-mingw-w64.patch
Created March 17, 2011 14:02
for mingw-w64. do "git clone git://github.com/atgreen/libffi" before applying the patch.
commit c3c8da7c49fc660a767f6702a01aba68a211b66c
Author: wanabe <[email protected]>
Date: Thu Mar 17 00:57:09 2011 +0900
treat drive-letter as directory
diff --git a/kernel/common/file.rb b/kernel/common/file.rb
index 941865b..ff09a58 100644
--- a/kernel/common/file.rb
+++ b/kernel/common/file.rb
// ==UserScript==
// @name ucjs_SlimDialogSidebar_0.2.1.15mod3.uc.js
// @namespace http://www.sephiroth-j.de/mozilla/
// @description サイドバーに表示する時に各種ダイアログをスリムにする
// @author otokiti
// @include chrome://mozapps/content/extensions/extensions.xul
// @include chrome://global/content/console.xul
// @include chrome://browser/content/preferences/cookies.xul
// @include chrome://passwordmgr/content/passwordManager.xul
// @include chrome://stylish/content/manage.xul?sidebar=1
@wanabe
wanabe / to_proc_with_args.patch
Created March 3, 2012 17:30
[1,2,10].map(&:to_s(16)) # => ["1", "2", "a"]
Index: parse.y
===================================================================
--- parse.y (revision 34892)
+++ parse.y (working copy)
@@ -2543,6 +2543,10 @@ block_arg : tAMPER arg_value
$$ = $2;
%*/
}
+ | tAMPER literal paren_args
+ {
@wanabe
wanabe / collect.patch
Created April 9, 2012 14:21
patch for CRuby. make Array#collect faster.
Index: array.c
===================================================================
--- array.c (revision 35267)
+++ array.c (working copy)
@@ -2255,12 +2255,19 @@ static VALUE
rb_ary_collect(VALUE ary)
{
long i;
- VALUE collect;
+ VALUE collect, v;
Index: lib/bitclust/rdcompiler.rb
===================================================================
--- lib/bitclust/rdcompiler.rb (revision 5176)
+++ lib/bitclust/rdcompiler.rb (working copy)
@@ -154,15 +154,18 @@ module BitClust
"<h#{level} #{name}>#{label}</h#{level}>"
end
- def ulist
+ def ulist(ident = nil)
Index: tools/bc-methods.rb
===================================================================
--- tools/bc-methods.rb (revision 5176)
+++ tools/bc-methods.rb (working copy)
@@ -158,10 +158,11 @@ def defined_methods(ruby, classname)
c.singleton_methods(false).each do |m|
puts "#{classname}.\#{m}"
end
+ opt = Kernel.method(:const_defined?).arity == 1 ? [] : [false]
c.instance_methods(false).each do |m|
require 'dxruby'
hlsl = <<EOS
float g_screen_w, g_screen_h;
float g_image_w, g_image_h;
float g_parse, g_scale;
texture tex0;
sampler Samp = sampler_state
{
diff --git a/cont.c b/cont.c
index 58b2d30..f37b9fc 100644
--- a/cont.c
+++ b/cont.c
@@ -880,6 +880,7 @@ make_passing_arg(int argc, VALUE *argv)
{
switch(argc) {
case 0:
+ case -2:
return Qnil;