Merge pull request #6 from willbryant/master

Fix ruby 2.0 compatibility
flush IO after each write to a channel
Merge commit 'ef6a8a8c7f0302f786294187af2053b73724e28d'