From: travis laduke Date: 2005-09-23T13:41:27+09:00 Subject: Re: hi, i'm new. plus one question On Sep 22, 2005, at 5:00 AM, Brian Schr�der wrote: > On 22/09/05, travis laduke wrote: > > > Hope this helps: > > bschroed@black:~/svn/projekte/ruby-things$ cat rotate.rb > module Rotate > def rotate(steps = 1) > steps = steps % self.length > self[-steps..-1].concat self[0...-steps] > end > end > > > regards, > > Brian > > -- > http://ruby.brian-schroeder.de/ > > Stringed instrument chords: http://chordlist.brian-schroeder.de/ > > you guys are magicians, thanks i thought not being able to rotate was the only thing standing in my way of finding all the anagrams (permutations) of a string so i can enhance my chances of beating my girlfriend at online scrabble. turns out its a lot harder than i first imagined. oh, and how to i point ruby to a directory where i want to put all my modules and such?, or where should i put all my modules and such? i'm on an apple computer. travis