implement block ruby and fix