fix ring example for non-consecutive names

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>