make ruby 2 compatible

@jmehnle not sure if it's good enough but at least it does not blow up ...
did not break any tests ....