Not sure about the Ruby specifics, but haven't seen issues with Perl, Java, or dotNET. Perhaps the childEntity (as it is in the SDK) is a moref, not the recursively extracted folder object, so your grep is failing. However, that doesn't make sense given it works for VirtualMachine.
There is no relationship to VMware Tools or any special setting outside of permissions that would hide a VM. It's likely that the search spec that Ruby is using is not recursive. Are some of those missing VMs in sub-folders?