Fixes compatibility for ruby 2.6.x
ixti/gitlab-experiment@023f3709 highlights a concern we can fairly easily fix, so we've improved some backwards compatibility.
I'm not sure it's worth adding specs for ruby 2.6.x, because it would be another version of ruby to build with, but it seemed easy enough to add/comment on.