From: "ibc (Iñaki Baz Castillo)" Date: 2012-06-12T08:32:19+09:00 Subject: [ruby-core:45573] [ruby-trunk - Bug #6550] crash 1.9.3 Issue #6550 has been updated by ibc (I��aki Baz Castillo). drbrain (Eric Hodel) wrote: > =begin > I have reproduced it and created a minimal test case (without rspec): > > class TestClass > def self.tdef name, &tdef_body > define_method name do > self.class.send(:define_method, :method_missing) do |meth, *args| > crash_in_infinite_loop(meth, *args) > end > > instance_eval(&tdef_body) > end > end > > tdef :hello do > call_method_missing > end > end > > TestClass.new.hello > > > =end Running this code in 1.9.3p0 I don't get a crash, but a simple "stack level too deep (SystemStackError)". ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] ---------------------------------------- Bug #6550: crash 1.9.3 https://bugs.ruby-lang.org/issues/6550#change-27170 Author: mrbrdo (Jan Berdajs) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p234 (2012-06-02 revision 35866) [x86_64-darwin11.4.0] I was playing around and I got the 1.9.3 interpreter to crash. Code: https://gist.github.com/2880210 Don't bother too much with the code I was just playing around. What I am doing there shouldn't work anyway, but it shouldn't crash the interpreter either :) At least I guess. Run with rspec filename.rb. The crash is related to method_missing and I guess it goes into an infinite circular thingy. Not really sure if something like this is supposed to not error out like this anyway, but I thought I should let you guys know. -- http://bugs.ruby-lang.org/