Fix ruby warnings.
Merge pull request #78 from nanliu/tb/warning

Fix ruby warnings.