def gemset_list_all(runas=None):
 gemsets = {}
 current_ruby = None
 output = _rvm_do('default', ['rvm', 'gemset', 'list_all'], runas=runas)
 if output:
  gems_regex = re.compile('^   ([^ ]+)')
  gemset_regex = re.compile('^gemsets for ([^ ]+)')
  for line in output.splitlines():
   match = gemset_regex.match(line)
   if match:
    current_ruby = match.group(1)
    gemsets[current_ruby] = []
   match = gems_regex.match(line)
   if match:
    gemsets[current_ruby].append(match.group(1))
 return gemsets

def gemset_list_all ( runas = None ) : gemsets = { } current_ruby = None output = _rvm_do ( 'default' , [ 'rvm' , 'gemset' , 'list_all' ] , runas = runas ) if output : gems_regex = re . compile ( '^   ([^ ]+)' ) gemset_regex = re . compile ( '^gemsets for ([^ ]+)' ) for line in output . splitlines ( ) : match = gemset_regex . match ( line ) if match : current_ruby = match . group ( 1 ) gemsets [ current_ruby ] = [ ] match = gems_regex . match ( line ) if match : gemsets [ current_ruby ] . append ( match . group ( 1 ) ) return gemsets
list all gemsets for all installed rubies .