Skip to content

Instantly share code, notes, and snippets.

View ujihisa's full-sized avatar

ujihisa ujihisa

View GitHub Profile
#!./ruby -v
# ruby 1.9.2dev (2009-05-28 trunk 23601) [i386-darwin9.7.0]
x = {}
x[0] = x
puts x.to_s #=> {0=>{0=>{...}}}
puts x.inspect #=> {0=>{...}}
# After the patch:
# http://gist.github.com/119556
#!~/git/ruby-trunk/ruby19/bin/ruby
require 'set'
class Set
alias to_s inspect
end
s = Set.new
s << s
puts s.to_s #=> #<Set: {#<Set: {...}>}>
puts s.inspect #=> #<Set: {#<Set: {...}>}>
Error detected while processing function vimshell#process_enter..vimshell#execute_command..vimshell#internal#ls#execute..vimshell#inter
nal#exe#execute..<SNR>54_init_process..proc#import..106..124..126..123:
line 4:
dlerror = "dlopen(/Users/ujihisa/.vim/autoload/proc.so, 5): image not found"
E364: Library call failed for "vp_dlopen()"
Error detected while processing function vimshell#process_enter..vimshell#execute_command..vimshell#internal#ls#execute..vimshell#inter
nal#exe#execute..<SNR>54_init_process..proc#import..106..124..126:
line 1:
E688: More targets than List items
line 2:
diff --git a/autoload/proc.c b/autoload/proc.c
index 2f760a7..d4aecbd 100644
--- a/autoload/proc.c
+++ b/autoload/proc.c
@@ -21,7 +21,7 @@
# include <sys/types.h>
# include <sys/ioctl.h>
# include <termios.h>
-# include <libutil.h>
+# include <util.h>
~/git/ruby-trunk/spec/rubyspec
[ujihisa@cupertino]$ mspecci [00:59:29]
ruby 1.9.2dev (2009-05-29 trunk 23606) [i386-darwin9.7.0]
.................F.......................E.................................................................................................................................................................................................................E.............................................................................................................................................................................................................................................................................................................................F...........................................................................heh
.......................................................................................................................................................
@ujihisa
ujihisa / gist:126913
Created June 9, 2009 23:57
vim hacks titles
require 'open-uri'
require 'rubygems'
require 'nokogiri'
(1..1/0.0).each do |i|
begin
f = open("http://vim-users.jp/feed/atom/?paged=#{i}")
rescue OpenURI::HTTPError
break
end
n = Nokogiri.XML(f)
def fact(n)(1..n).inject &:*end
p fact(10) #=> 3628800
[ujihisa@cupertino]$ make -f ./make_mac.mak [09:27:13]
gcc -W -Wall -Wno-unused -ansi -pedantic -bundle -fPIC -o autoload/proc.so autoload/proc.c -lutil
autoload/proc.c:24:22: error: libutil.h: No such file or directory
autoload/proc.c: In function ‘vp_pty_open’:
autoload/proc.c:467: warning: implicit declaration of function ‘forkpty’
make: *** [autoload/proc.so] Error 1
Error detected while processing function vimshell#process_enter..vimshell#execute_command..vimshell#internal#iexe#execute..116..136..12
3:
line 4:
E368: got SIGBUS in libcall()
E364: Library call failed for "vp_pty_open()"
Error detected while processing function vimshell#process_enter..vimshell#execute_command:
line 37:
E171: Missing :endif
Error detected while processing function vimshell#process_enter..vimshell#execute_command..vimshell#internal#ls#execute..vimshell#inter
nal#exe#execute..interactive#execute_pipe_out:
line 14:
E716: Key not present in Dictionary: stderr.eof
E15: Invalid expression: !b:vimproc_sub.stderr.eof
line 24:
E716: Key not present in Dictionary: stderr.eof
E15: Invalid expression: b:vimproc_sub.stdout.eof && b:vimproc_sub.stderr.eof
line 14:
E716: Key not present in Dictionary: stderr.eof