Issue #9454 has been updated by Eric Wong. Btw, TestException#test_machine_stackoverflow_by_define_method fails on an ancient glibc 2.5-42.el5_4.3 (CentOS 5.4 x86_64). I think this is a bug in pthread_getattr_np when it is run on the main thread. I'm not sure how many people care about a platform this old, though; and I've been meaning to upgrade that anyways. ---------------------------------------- Bug #9454: The define_method(:class) segfault https://bugs.ruby-lang.org/issues/9454#change-44725 * Author: Kyrylo Silin * Status: Closed * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux] * Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- Ruby 2.1.0p0 segfaults when I invoke the following code. define_method(:class) { self.class } self.class #=> segfault :( It affects exclusively Ruby 2.1.0p0 (I also tested on the most recent 2.0.0, 1.9.3 and 1.8.7). By the way, on the contrary, the following code *does not segfault*. def self.class; self.class end self.class #=> SystemStackError Viva la Ucraino revolucin! ---Files-------------------------------- bug9454.txt (625 KB) -- http://bugs.ruby-lang.org/