Skip to content

Instantly share code, notes, and snippets.

View yfeldblum's full-sized avatar

Jay Feldblum yfeldblum

  • Meta
  • San Jose, CA
View GitHub Profile
@yfeldblum
yfeldblum / run
Created September 19, 2011 21:42
Notes:
mongoid: https://github.com/mongoid/mongoid/commit/15ac280c37ca1f5bcdd517a368bb0735d2806321 (master)
@yfeldblum
yfeldblum / rspec-spec
Created September 25, 2011 21:55
attribute_will_change! in mongoid-2.3 and earlier
.....FF....FF
Failures:
1) Widget without control changes
Failure/Error: its(:changes) { should include("ferocious") }
expected {} to include "ferocious"
Diff:
@@ -1,2 +1,2 @@
-ferocious
FF
Failures:
1) Widget the object itself attributes
Failure/Error: its(:attributes) { should_not include("level") }
expected {"_id"=>BSON::ObjectId('4e8081eeb2bc073bf9000001'), "level"=>nil} not to include "level"
Diff:
@@ -1,2 +1,2 @@
Mongoid.identity_map_enabled = true
class Post
include Mongoid::Document
belongs_to :blog
end
class Blog
include Mongoid::Document
@yfeldblum
yfeldblum / cached_lp_sorted_lf.patch
Created December 20, 2011 20:27 — forked from funny-falcon/cached_lp_sorted_lf.patch
Cumulative: Sorted loaded features + Cached load path (against 1.9.3-p0)
diff --git a/file.c b/file.c
index 81f28ff..6aad4b0 100644
--- a/file.c
+++ b/file.c
@@ -2819,6 +2819,20 @@ ntfs_tail(const char *path)
buflen = RSTRING_LEN(result),\
pend = p + buflen)
+#define EXPAND_PATH()\
+ if ( !(abs_mode & FEP_DIR_EXPANDED) ) { \
@yfeldblum
yfeldblum / hash_optimize.patch
Created December 23, 2011 13:58 — forked from funny-falcon/hash_optimize.patch
Hash optimize patch (1.9.3-p0)
diff --git a/common.mk b/common.mk
index ea244cc..de09d9a 100644
--- a/common.mk
+++ b/common.mk
@@ -692,7 +692,8 @@ signal.$(OBJEXT): {$(VPATH)}signal.c $(RUBY_H_INCLUDES) \
$(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
{$(VPATH)}regex.h {$(VPATH)}vsnprintf.c $(ENCODING_H_INCLUDES)
-st.$(OBJEXT): {$(VPATH)}st.c $(RUBY_H_INCLUDES)
+st.$(OBJEXT): {$(VPATH)}st.c $(RUBY_H_INCLUDES) {$(VPATH)}pool_alloc.inc.h \
@yfeldblum
yfeldblum / cumulative_performance.patch
Created January 23, 2012 14:55 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p0 cumulative performance patch.
diff --git a/common.mk b/common.mk
index ea244cc..4f22609 100644
--- a/common.mk
+++ b/common.mk
@@ -629,7 +629,8 @@ file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
{$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
{$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
- {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h
+ {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h \
@yfeldblum
yfeldblum / backport_gc.patch
Created January 27, 2012 12:10 — forked from funny-falcon/backport_gc.patch
Backport new GC for ruby-1.9.3-p0
diff --git a/ChangeLog b/ChangeLog
index c4ea779..0a6bf73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,188 @@
+Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (aligned_malloc, aligned_free): covered missing defined
+ operators and fixes for cygwin.
+
@yfeldblum
yfeldblum / 0-readme.md
Created January 28, 2012 16:50 — forked from burke/0-readme.md
ruby-1.9.3-p0 cumulative performance patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

original_pear_version = nil
ruby_block "check_pear_version" do
block do
original_pear_version = %x[ pear -V 2>&1 ].match(/PEAR.*(\d+\.\d+\.\d+)/)[1]
original_pear_version = Gem::Version.create(original_pear_version)
end
end
declared_pear_version = Gem::Version.create("1.6.1")