Issue #7308 has been reported by charliesome (Charlie Somerville).

----------------------------------------
Bug #7308: Infinite recursion on circular 'using'
https://bugs.ruby-lang.org/issues/7308

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 2.0.0-preview1


This code causes infinite recursion:

    module X; using X; end

Note that any circular 'using' will cause infinite recursion, not just a module using itself:

    module A; end
    module B; using A; end
    module A; using B; end

This raises a SystemStackError on my OS X Lion machine, but it causes a segmentation fault on Ubuntu 10.04 i686 (running 2.6.32-38). I've attached a dump of an IRB session which finishes with a segfault.


-- 
http://bugs.ruby-lang.org/