Needed ruby 1.8.7 for testing
Fix syntax that makes ruby 1.8.7 unhappy
Fix test on ruby 1.8.7

Symbols respond to to_i, get over it and just test a more realistic case like a string.
Also make the core more idiomatic ruby.