From: Martin DeMello Date: 2005-04-12T23:29:38+09:00 Subject: Re: Translating A Pattern of Data Into Equation, and ultimately code Glenn Parker wrote: > > > > irb(main):003:0> s = "abc" > > => "abc" > > irb(main):004:0> s.gsub(/./){|c|((c[0]-?`)^($`.size+1)).chr} > > => "\000\000\000" > > Well, that's pretty funny, but it's also correct. This particular > encoding, operating on the alphabet, i.e. "abcdefg..." produces all > zeros. Think about it. LOL! Okay, I feel silly now :) martin