Skip to content

Instantly share code, notes, and snippets.

View watermint's full-sized avatar
💭
I may be slow to respond.

Takayuki Okazaki watermint

💭
I may be slow to respond.
View GitHub Profile
@watermint
watermint / gist:3433770
Created August 23, 2012 07:17
Restart Node
#!/usr/bin/env ruby
pipe = '/somewhere/commands'
launch_cmd = 'cd /somewhere ; node'
process_name = 'node'
open(pipe, 'r') do |f|
begin
f.each_line do |line|
case line.strip
@watermint
watermint / gist:3273976
Created August 6, 2012 12:07
ByteCodeMachine fails (JRuby 1.7.0preview1)
It's not reproducible with option --1.8.
ByteCodeMachine.java:561:in `opExactMB3N': java.lang.ArrayIndexOutOfBoundsException: 20
from ByteCodeMachine.java:205:in `matchAt'
from Matcher.java:293:in `matchCheck'
from Matcher.java:438:in `search'
from RubyString.java:2799:in `subBangNoIter19'
from RubyString.java:2755:in `sub_bang19'
from RubyString$INVOKER$i$sub_bang19.gen:-1:in `call'
from JavaMethod.java:343:in `call'