From: Yusuke ENDOH Date: 2011-07-24T12:05:31+09:00 Subject: [ruby-core:38441] Re: [Ruby 1.9 - Bug #5047] Segfault (most likely involving require) Follow-up. I found activesupport uses UnboundMethod and #bind to check whether a class instance is singleton or not. 102 def singleton_class? 103 # in case somebody is crazy enough to overwrite allocate 104 allocate = Class.instance_method(:allocate) 105 # object.class always points to a real (non-singleton) class 106 allocate.bind(self).call.class != self 107 rescue TypeError 108 # MRI/YARV/JRuby all disallow creating new instances of a singleton class 109 true 110 end Of course, this is not a fault of activesupport, but this seems one factor to this SEGV. If you need to work around this issue right now, the following patch for activesupport might work. $ diff -u active_support/core_ext/class/attribute.rb.orig active_support/core_ext/class/attribute.rb --- active_support/core_ext/class/attribute.rb.orig 2011-07-24 11:51:32.690364370 +0900 +++ active_support/core_ext/class/attribute.rb 2011-07-24 11:51:35.990380754 +0900 @@ -100,6 +100,7 @@ private def singleton_class? + return !ancestors.include?(self) # in case somebody is crazy enough to overwrite allocate allocate = Class.instance_method(:allocate) # object.class always points to a real (non-singleton) class At least, SEGV does not occur with this patch on my machine. Could anyone please try it? Again, this is not a fault of activesupport. This is just workaround patch. -- Yusuke Endoh