Fixed #3830 - os list fails on ruby < 1.9