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
require 'pg' | |
class PG::Connection | |
def self.wrap_send_method(meth) | |
alias_method "#{meth}_wo_wrap", meth | |
define_method(meth) do |*args| | |
begin | |
send("#{meth}_wo_wrap", *args) | |
rescue PG::UnableToSend => e |
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
gem 'activerecord', '4.2.0.beta4' | |
# gem 'activerecord', '4.1.8' | |
# gem 'activerecord', '4.0.12' | |
gem 'pg', '0.18.0.pre20141117110243' | |
# gem 'pg', '0.17.1' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' |
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
require 'active_support' | |
require 'active_record' | |
require 'benchmark/ips' | |
p ActiveRecord::VERSION::STRING | |
# ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' | |
ActiveRecord::Base.establish_connection adapter: 'postgresql' | |
ActiveRecord::Base.connection.instance_eval do | |
create_table(:people, force: true) do |t| |
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
diff --git a/lib/pg.rb b/lib/pg.rb | |
index 3d96b75..b9b8b65 100644 | |
--- a/lib/pg.rb | |
+++ b/lib/pg.rb | |
@@ -10,7 +10,7 @@ rescue LoadError | |
# Set the PATH environment variable, so that libpq.dll can be found. | |
old_path = ENV['PATH'] | |
- ENV['PATH'] = "#{old_path};#{File.expand_path("../#{RUBY_PLATFORM}", __FILE__)}" | |
+ ENV['PATH'] = "#{File.expand_path("../#{RUBY_PLATFORM}", __FILE__)};#{old_path}" |
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
#include <ruby.h> | |
#include <ruby/io.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
#include <signal.h> | |
extern void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1, | |
rb_unblock_function_t *ubf, void *data2); | |
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1); |
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
$ rake test | |
Run options: --seed 55946 | |
# Running tests: | |
*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************S**********S****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************FFEF************************************************************** |
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
#encoding: utf-8 | |
require 'fox16' | |
include Fox | |
class HelloWindow < FXMainWindow | |
def initialize(app) | |
ventana = super(app, "Hello, World!", width: 600, height: 400) | |
MiFXText.new(ventana) |
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
require 'active_record' | |
ActiveRecord::Base.configurations['my_connect'] = {:adapter=>'sqlite3', :database=>'fixture_database.sqlite3'} | |
class Car < ActiveRecord::Base | |
establish_connection 'my_connect' | |
has_many :tyres | |
end | |
class Tyre < ActiveRecord::Base |
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
--- /home/lars/.rvm/src/ruby-1.9.3-p0/st.c 2011-01-27 15:30:00.000000000 +0100 | |
+++ vm/capi/19/include/ruby/st.h 2011-10-28 23:17:41.741629969 +0200 | |
@@ -1,18 +1,89 @@ | |
/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ | |
-/* static char sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; */ | |
+/* @(#) st.h 5.1 89/12/14 */ | |
+ | |
+#ifndef RUBY_ST_H | |
+#define RUBY_ST_H 1 |
NewerOlder