From: John Griffiths Date: 2009-05-14T12:44:57+09:00 Subject: find previous & next in array hi, anyone know how to do this? basically i've got an array of items a = ['a','b','c','d'] now given i can find the position of say 'c' using .index('c'), how do i get the positions of the ones previous & next to it. a recursive routine would probably do it, but looking for something more flash any ideas? -- Posted via http://www.ruby-forum.com/.