save_and_open_page
have_button(locator)
if Rails.env.development? | |
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def call_with_quiet_assets(env) | |
previous_level = Rails.logger.level | |
Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/} | |
call_without_quiet_assets(env) | |
ensure |
static int | |
find_reusable_reload (rtx *p_in, rtx out, enum reg_class rclass, | |
enum reload_type type, int opnum, int dont_share) | |
{ | |
rtx in = *p_in; | |
int i; | |
/* We can't merge two reloads if the output of either one is | |
earlyclobbered. */ | |
if (earlyclobber_operand_p (out)) |
A daily glance at what's happening in a high velocity codebase, thanks to @defunkt:
https://github.com/your/repo/compare/master@{yesterday}...master
Bookmark, share, and enjoy.
Try out the fast require patch from http://bugs.ruby-lang.org/issues/7158 on Ruby 1.9.3-p327
Capybara.add_selector :record do | |
xpath { |record| XPath.css("#" + ActionController::RecordIdentifier.dom_id(record)) } | |
match { |record| record.is_a?(ActiveRecord::Base) } | |
end |
1) Natural Assertions | |
Failure/Error: Then { foo + bar == 2 } | |
Then expression failed at /Users/jim/working/git/rspec-given/examples/failing/sample_spec.rb:6 | |
expected: 3 | |
to equal: 2 | |
false <- foo + bar == 2 | |
3 <- foo + bar | |
1 <- foo | |
2 <- bar | |
# ./lib/rspec/given/extensions.rb:64:in `_rg_evaluate' |
This is a proof-of-concept of a couple of concurrent data structures written in Ruby.
The implementations are heavily commented for those interested. There are benchmarks (with results) included below. The results are interesting, but, as always, take with a grain of salt.
AtomicLinkedQueue
is a lock-free queue, built on atomic CAS operations.