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
# puts (s="puts (s=%s)%%s.dump")%s.dump | |
require 'rspec' | |
RSpec::Core::Runner.disable_autorun! | |
describe "foo" do | |
it "bar" do | |
end | |
it "baz", :banane => true do | |
end |
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
From 76d3b0e6e95097915e210faccc226562fe2723de Mon Sep 17 00:00:00 2001 | |
From: Kaspar Schiess <kaspar.schiess@absurd.li> | |
Date: Tue, 28 Dec 2010 11:24:04 +0100 | |
Subject: [PATCH 1/2] . ignores argument and is thus a proc | |
--- | |
lib/map.rb | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) |
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
#!/opt/csw/bin/ruby | |
directory = ARGV.join(' ') | |
count = ['?', '?'] | |
# get users, which have created files in dir | |
# | |
users = Hash.new(0) | |
`tree -u '#{directory}'`.split("\n").each do |line| |
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
# Its easy really, you want the proc to 'plus' to arguments really, so | |
# just put a plus in there! | |
# (Or: Most flagrant abuse of unary plus) | |
class AsArgument < Struct.new(:symbol) | |
def to_proc | |
proc { |el| send(symbol, el) } | |
end | |
end | |
class Symbol |
NewerOlder