diff --git a/library/gem b/library/gem index 4270d3dfdc..ee76875058 100755 --- a/library/gem +++ b/library/gem @@ -130,7 +130,10 @@ def install(module): return ver = get_rubygems_version(module) - major = ver[0] if ver else None + if ver: + major = ver[0] + else: + major = None cmd = [ module.get_bin_path('gem', True) ] cmd.append('install')