Fix Ruby warnings

Start of fixing warnings provided by Ruby.

Still a **WIP** not ready to merge yet.

Ruby versions:

- [x] 2.1.2
- [ ] 2.1.1
- [ ] 2.1.0
- [ ] 2.0.0
- [ ] 1.9.3
- [ ] 1.9.2
- [ ] 1.8.7

- Resolves #1088
I thought ruby wouldn't warn on unused locals that are  prefixed with `_`?