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
GNU gdb (GDB) 7.0-debian | |
Copyright (C) 2009 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "i486-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... | |
Reading symbols from /usr/lib/debug/usr/bin/ruby1.8...done. |
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/ruby | |
require 'rubygems' | |
require 'ruby-growl' | |
require 'socket' | |
require 'shellwords' | |
require 'cgi' | |
UDPSocket.open do |u| | |
u.bind('localhost', Growl::GROWL_UDP_PORT) | |
loop do |
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 Rack | |
class Lint | |
unless method_defined?(:call_with_close) | |
def call_with_close(env = nil) | |
call_without_close(env).tap do |status, headers, body| | |
body.close if body.respond_to?(:close) | |
end | |
end | |
alias_method_chain :call, :close |
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
--- /tmp/prev 2009-09-12 10:12:20.000000000 +0900 | |
+++ /tmp/post 2009-09-12 10:12:25.000000000 +0900 | |
@@ -1,14 +1,14 @@ | |
-Finished in 518.233488 seconds. | |
+Finished in 535.442002 seconds. | |
1) Failure: | |
test_free=(DL::TestCPtr) [/var/tmp/ruby/trunk/test/dl/test_cptr.rb:12]: | |
[ruby-dev:39269] | |
-pid 834 killed by SIGABRT (signal 6) |
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
# What? | |
# Monkey patch for https://rails.lighthouseapp.com/projects/8994/tickets/1708 | |
# | |
# Where? | |
# Rails 2.3.2 (gem) | |
# $ rails test_foo | |
# $ cd test_foo | |
# $ ruby script/generate model TestFoo name:string | |
# $ rake db:migrate RAILS_ENV=test | |
# $ env RAILS_ENV=test ruby -I test test/unit/test_foo_test.rb -v |
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
#!ruby1.9 | |
# -*- coding: us-ascii -*- | |
Encoding.default_external = "ASCII-8BIT" | |
require "optparse" | |
def squeeze_blank | |
re = /\A\Z/ | |
lfd = 0 | |
->(block) do | |
block.replace( |
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 | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
module Jleague | |
module_function | |
def miniscore2mobile | |
uri = "http://www.tbs.co.jp/supers/miniscore#{rand( 3 ) + 1}.htm" |
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/irb/context.rb b/irb/context.rb | |
index de70945..0c114ef 100644 | |
--- a/irb/context.rb | |
+++ b/irb/context.rb | |
@@ -215,6 +215,7 @@ module IRB | |
end | |
def evaluate(line, line_no) | |
+ @io.savehist | |
@line_no = line_no |
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 ::ActionController | |
class Request | |
unless method_defined?(:local_ip) | |
require "socket" | |
require "ipaddr" | |
def local_ip | |
f = Socket.do_not_reverse_lookup | |
Socket.do_not_reverse_lookup = true | |
ip = IPAddr.new(remote_ip) |
NewerOlder