fixes 1.8.7 ruby support
make the code match the documentation