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
runtime ftplugin/changelog.vim | |
function! s:setup_ruby_trunk() | |
let path = expand('%:p:h') | |
let name = 'ruby.c' | |
while isdirectory(path) | |
let ruby = path . '/' . name | |
if filereadable(name) | |
break |
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
require 'io/console' | |
def read_char | |
$stdin.noecho do | |
$stdin.raw do | |
input = $stdin.getc.chr | |
if input == "\e" then | |
input << $stdin.read_nonblock(3) rescue nil | |
input << $stdin.read_nonblock(2) rescue nil |
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
$ make | |
CC = clang | |
LD = ld | |
LDSHARED = clang -dynamic -bundle | |
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -pipe | |
XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE | |
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I. | |
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -Wl,-pie | |
SOLIBS = | |
compiling main.c |
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
$ sudo ruby -Ilib bin/drbdump | |
[...] | |
^C | |
11715 total packets captured | |
0 Rinda packets captured | |
2007 DRb packets captured | |
1003 messages sent | |
1004 results received | |
1 exceptions raised |
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
require 'net/http' | |
puts RUBY_DESCRIPTION | |
uri = URI 'http://segment7.net' | |
http = Net::HTTP.new uri.host, uri.port | |
http.set_debug_output $stderr | |
http.start do |
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
$ sudo ruby -Ilib bin/drbdump -qnc 1000 | |
41251 total packets captured | |
0 Rinda packets captured | |
1757 DRb packets captured | |
1000 messages sent | |
757 results received | |
0 exceptions raised | |
Messages sent min, avg, max, stddev: | |
call (1 args) 457 sent; 3.0, 3.0, 3.0, 0.0 allocations; 0.202, 1.181, 9.167, 1.363 ms |
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
module A | |
def a | |
p :A | |
end | |
end | |
module B | |
include A | |
def a |
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 --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb | |
index 0f43b3d..3c4375f 100755 | |
--- a/lib/rubygems/core_ext/kernel_require.rb | |
+++ b/lib/rubygems/core_ext/kernel_require.rb | |
@@ -4,8 +4,13 @@ | |
# See LICENSE.txt for permissions. | |
#++ | |
+require 'monitor' | |
+ |
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
BACKUPDIR = $HOME/.mail_backup | |
ARCHIVE = $HOME/.mail_archive/`date +"%Y/%U"` | |
# Create a backup cache of 2000 most recent messages in case of mistakes | |
:0c: | |
$BACKUPDIR | |
:0 ic | |
| cd $BACKUPDIR && rm -f dummy `ls -t msg.* | sed -e 1,2000d` |
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
require 'test/unit' | |
class T < Test::Unit::TestCase | |
def test_assert_raise | |
assert_raises ArgumentError, NameError do | |
raise ArgumentError | |
end | |
assert_raises ArgumentError, NameError do | |
raise NameError |