This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require "rbconfig" | |
require_relative './ennou.rb' | |
module Rack | |
module Handler | |
class Ennoumu < Ennou |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- sound.c~ Sun Apr 15 21:46:08 2012 | |
+++ sound.c Sat Oct 13 17:43:16 2012 | |
@@ -1,4 +1,5 @@ | |
#define WINVER 0x0500 /* バージョン定義 Windows2000以上 */ | |
+#define DIRECTSOUND_VERSION 0x0900 | |
#define _WIN32_WINNT WINVER | |
#include "ruby.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for JDK1.7 | |
# export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home | |
# else | |
# export JAVA_HOME= | |
# | |
if ENV['JAVA_HOME'] | |
if File.exist?("#{ENV['JAVA_HOME']}/jre/lib/server/libjvm.dylib") | |
ENV['JVM_LIB'] = "#{ENV['JAVA_HOME']}/jre/lib/server/libjvm.dylib" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
require 'rjb' | |
module JavaIterator | |
def each | |
i = self.iterator | |
while i.has_next | |
yield i.next | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
class Fwrapper | |
def initialize(name, nchildren, &fun) | |
@childcount = nchildren | |
@name = name | |
@func = fun | |
end | |
attr_reader :func, :name, :childcount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -p -u assets.rake~ assets.rake | |
--- assets.rake~ Sat Jan 28 23:55:07 2012 | |
+++ assets.rake Sun Jan 29 04:19:54 2012 | |
@@ -6,7 +6,11 @@ namespace :assets do | |
groups = ENV['RAILS_GROUPS'] || 'assets' | |
args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"] | |
args << "--trace" if Rake.application.options.trace | |
- fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args) | |
+ if $0 =~ /rake\.bat\Z/i | |
+ Kernel.exec $0, *args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arton@nomad:~/public_html/diary/misc/plugin$ diff -pu disp_referrer.rb.old disp_referrer.rb | |
--- disp_referrer.rb.old 2011-07-24 23:23:42.000000000 +0900 | |
+++ disp_referrer.rb 2011-07-24 23:28:55.000000000 +0900 | |
@@ -1015,25 +1015,28 @@ class DispRef2Refs | |
end | |
result << '<ul>' | |
@refs[cat_key].each do |a| | |
- if a[2].size == 1 then | |
- result << %Q[<li><a rel="nofollow" href="#{DispRef2String::escapeHTML( a[2][0][1].url )}">#{DispRef2String::escapeHTML( a[2][0][1].title )}</a> ×#{a[0]}</li>\n] | |
- elsif not a[2][0][1].title_ignored then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- hash.c~ Tue Mar 08 23:06:17 2011 | |
+++ hash.c Sat Mar 19 17:24:57 2011 | |
@@ -2194,6 +2194,20 @@ envix(const char *nam) | |
} | |
#endif | |
+#if defined(_WIN32) | |
+static int | |
+getenvsize(char* p) | |
+{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81) Failure: | |
test_cgi(TestWEBrickCGI) [C:/Users/arton/Documents/ruby/src/rubytrunk/test/webri | |
ck/test_cgi.rb:33]: | |
webrick log start: | |
[2011-03-19 14:24:47] INFO WEBrick 1.3.1 | |
[2011-03-19 14:24:47] INFO ruby 1.9.3 (2011-03-19) [i386-mswin32_100] | |
[2011-03-19 14:24:47] INFO WEBrick::HTTPServer#start: pid=9120 port=59857 | |
[2011-03-19 14:24:47] ERROR CGIHandler: C:/Users/arton/Documents/ruby/src/ruby | |
trunk/test/webrick/webrick.cgi: | |
C:/Users/arton/Documents/ruby/src/rubytrunk/lib/webrick/httpservlet/cgi_runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- test_process.rb~ Mon Feb 28 21:20:03 2011 | |
+++ test_process.rb Thu Mar 03 08:42:34 2011 | |
@@ -360,6 +360,11 @@ class TestProcess < Test::Unit::TestCase | |
ECHO = lambda {|arg| [RUBY, '-e', "puts #{arg.dump}; STDOUT.flush"] } | |
SORT = [RUBY, '-e', "puts ARGF.readlines.sort"] | |
CAT = [RUBY, '-e', "IO.copy_stream STDIN, STDOUT"] | |
+ | |
+ def reserve_fd(n) | |
+ fds = n.times.to_a.map {|fn| File.open("#{rand}#{fn}", "w")} | |
+ fds.map {|f| fd = f.to_i; f.close; File.delete(f.path); fd} |