ruby1.9.x maxdepth mode

Here is the patch proposed as discussed in ussue#2