Merge pull request #6 from willbryant/master

Fix ruby 2.0 compatibility
flush IO after each write to a channel