This file contains hidden or 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/.gitignore b/.gitignore | |
index 57557c9..7955376 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -129,3 +129,4 @@ y.tab.c | |
# /win32/ | |
/win32/*.ico | |
+ext/win32ole/.document | |
diff --git a/array.c b/array.c |
This file contains hidden or 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
class C | |
attr_accessor :b | |
def foo | |
b ? b.foo : raise(NoMethodError.new) | |
end | |
alias gob foo |
This file contains hidden or 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
# Saves an MP3 of the phrase using Google's text-to-voice. | |
# | |
# USAGE | |
# | |
# From the command line: | |
# | |
# $ ruby google-say.rb Hello World | |
# | |
# Or you can just require it and call Google.say(phrase) | |
require 'open-uri' |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# urlmonitor - print out the URLs requested system wide on the main network interface | |
# Accept a network interface name as an optional argument | |
iface = ARGV.first | |
# No interface specified? Try to guess which one is king.. | |
unless iface | |
`ifconfig -l`.split.each do |iface| | |
next if iface =~ /^lo/ |
This file contains hidden or 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 Shoulda | |
module Macros | |
def should_change(expression, options = {}) | |
by, from, to = get_options!([options], :by, :from, :to) | |
stmt = "change #{expression.inspect}" | |
stmt << " from #{from.inspect}" if from | |
stmt << " to #{to.inspect}" if to | |
stmt << " by #{by.inspect}" if by | |
expression_eval = lambda { eval(expression) } |
This file contains hidden or 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 'rubygems' | |
require 'yaml' | |
require 'set' | |
SEATTLERB = [ | |
'aaron patterson', | |
'alex vollmer', | |
'andy smith', | |
'damon danieli', | |
'dave myron', |