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
- [x] 1.9.3
- [ ] 1.9.2
- [ ] 1.8.7

- Resolves #1088
Will do