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.
This issue was solved with changeset r37646.
Charlie, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
eval.c (rb_mod_using): raise an ArgumentError if cyclic using is
detected. based on the patch by Charlie Somerville. [ruby-core:49092] Bug #7308