1580 for 3 0

This is #1580 backported to 3.0 so it can be included in 3.0.1.  I had to copy over the recursive const methods module since rspec-support 3.0.0 does not have it.