Relax test if Gem.ruby is not the name of the binary being run in the end

This resolves #703
Merge pull request #755 from strzibny/fix-test

Relax test if Gem.ruby is not the name of the binary being run in the end