Skip to content

Instantly share code, notes, and snippets.

@takaokouji
Created September 6, 2011 06:59
Show Gist options
  • Save takaokouji/1196796 to your computer and use it in GitHub Desktop.
Save takaokouji/1196796 to your computer and use it in GitHub Desktop.
fixed a SEGV that is included #ee78786
Changes in HEAD
Modified lib/date.rb
diff --git a/lib/date.rb b/lib/date.rb
index 2fcde74..c367c9c 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -1392,11 +1392,8 @@ class Date
when Numeric; return jd == other
when Date; return jd == other.jd
else
- begin
- l, r = other.coerce(self)
- return l === r
- rescue NoMethodError
- end
+ l, r = other.coerce(self)
+ return l === r
end
false
end
Modified variable.c
diff --git a/variable.c b/variable.c
index 540fcd2..bb52aef 100644
--- a/variable.c
+++ b/variable.c
@@ -949,6 +949,11 @@ rb_class_ivar_set_dict(VALUE mod, CFMutableDictionaryRef dict)
void
merge_ivars(const void *key, const void *val, void *ctx)
{
+ ID id = (ID)key;
+ if (id == id_classpath || id == id_classid
+ || id == idIncludedModules || id == idIncludedInClasses) {
+ return;
+ }
CFMutableDictionaryRef dest_dict = (CFMutableDictionaryRef)ctx;
CFDictionarySetValue(dest_dict, key, val);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment