Fixed version checking for Ruby-legacy.