View before.txt
1 2 3 4 5 6 7 8 9 10
==================================
Mode: cpu(1000)
Samples: 8595 (0.00% miss rate)
GC: 1106 (12.87%)
==================================
TOTAL (pct) SAMPLES (pct) FRAME
813 (9.5%) 813 (9.5%) ActiveSupport::SafeBuffer#initialize
699 (8.1%) 350 (4.1%) block in ActiveRecord::AttributeMethods::Read#read_attribute
486 (5.7%) 298 (3.5%) ActionController::UrlFor#url_options
670 (7.8%) 274 (3.2%) ActionDispatch::Journey::Format#evaluate
View nme.rb
1 2 3 4 5 6 7 8 9 10
class Foo
def method_missing name, *args
p args
end
end
 
class Bar < Foo
def omg
super # should raise a no method error
end
View hahaha.txt
1 2 3 4 5 6 7 8 9 10
Started GET "/users" for 127.0.0.1 at 2014-05-21 15:29:48 -0700
ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by UsersController#index as */*
User Load (0.1ms) SELECT "users".* FROM "users"
##########################################################################################
/Users/aaron/git/rails/actionview/lib/action_view/routing_url_for.rb:101:in `url_options'
/Users/aaron/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:175:in `call'
/Users/aaron/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:269:in `block (2 levels) in define_url_helper'
/Users/aaron/git/omglolwut/app/views/users/index.html.erb:25:in `_app_views_users_index_html_erb__2589710368981423133_70120446187800'
/Users/aaron/git/rails/actionview/lib/action_view/template.rb:145:in `block in render'
View change.diff
1 2 3 4 5 6 7 8 9 10
diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb
index 8272a55..e8083a5 100644
--- a/activerecord/lib/active_record/associations/belongs_to_association.rb
+++ b/activerecord/lib/active_record/associations/belongs_to_association.rb
@@ -46,8 +46,9 @@ module ActiveRecord
def update_counters(record)
with_cache_name do |name|
return unless different_target? record
- record.class.increment_counter(name, record.id)
- decrement_counter name
View omg.diff
1 2 3 4 5 6 7 8 9 10
diff --git a/lib/sprockets/cache_wrapper.rb b/lib/sprockets/cache_wrapper.rb
index 8301e67..c4c9f96 100644
--- a/lib/sprockets/cache_wrapper.rb
+++ b/lib/sprockets/cache_wrapper.rb
@@ -38,21 +38,6 @@ module Sprockets
end
end
- class IndexWrapper < CacheWrapper
- def initialize(*args)
View keybase.md

Keybase proof

I hereby claim:

  • I am tenderlove on github.
  • I am tenderlove (https://keybase.io/tenderlove) on keybase.
  • I have a public key whose fingerprint is 4CE9 1B75 A798 28E8 6B1A A8BB 9531 70BC B4FF AFC6

To claim this, I am signing this object:

View itr_index.rs
1 2 3 4 5 6 7 8 9
fn yay(left: &str) {
for (idx, c) in left.char_indices() {
println!("{} {}", idx, c);
}
}
 
fn main() {
yay("hello !!! こんにちは!");
}
View error.rb
1 2 3 4 5 6 7 8 9 10
require 'active_record'
require 'minitest/autorun'
 
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.establish_connection(adapter: "postgresql", host: "localhost", database: "test")
 
class User < ActiveRecord::Base
connection.create_table table_name, force: true do |t|
end
has_many :profile_views
View omg.diff
1 2 3 4 5 6 7 8 9 10
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb
index 31b8d27..1680951 100644
--- a/activerecord/lib/active_record/associations/has_many_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -30,17 +30,29 @@ module ActiveRecord
unless owner.new_record?
records.flatten.each do |record|
raise_on_type_mismatch!(record)
- record.save! if record.new_record?
end
View argh.rb
1 2 3 4 5 6 7 8 9 10
require 'active_record'
require 'minitest/autorun'
 
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
 
class Message < ActiveRecord::Base
connection.create_table(table_name)
connection.create_table :message_threads_messages, id: false do |t|
t.references :message
t.references :message_thread
Something went wrong with that request. Please try again.