Support nested C++ classes in Ruby

This fixes a SIGSEGV when parsing nested C++ classes for Ruby.

Original bug report: https://bugzilla.novell.com/show_bug.cgi?id=892480