fixed ruby reduce
added regression test for Issue #545
removed debug statement from ruby driver