Rename unused variable

This commit removes below Ruby's warning.

* "warning: assigned but unused variable"
Remove discarding method definition

This commit removes below Ruby's warning.

* "warning: method redefined"
Merge pull request #265 from kachick/improve-remove_warnings

Clean up Ruby's warnings in lib/