Revert code to compatible with ruby 1.9.3 and change the value type to float.