--00151750e7a0324a84049a9504ef Content-Type: text/plain; charset=ISO-8859-1 in VB, ' can means both assignment and equality, so the following does what you expect: >>if line[i] " in ruby, you want ' for equality (and ' for assignment), so the above line should be >>if line[i] '" On Mon, Jan 24, 2011 at 4:17 AM, Roland Klein overmeer < roland / kleinovermeer.nl> wrote: > Hello All, > > I'm a newbie, just started programming Ruby about 1 month ago. Have lots > of experience with vb so the programming concepts are clear to me. I'm > building a script that is using the sample stream of the Twitter API and > insert it into MySQL for analysis. The problem is, that some of the > tweets have a ' in them. I want to replace them with '' so insert into > SQL is not a problem. I have written some piece of code trying to get > this to work, but the output replaces every letter with ''. This is the > code: > > if line.include?"'" > result > teller ne.length-1 > for i in 1..teller do > if line[i] " > result ォ 「ァァ「 セ セ ォ ロン セ セ セ セ セ セ ラ ノ ソ セ セ ヤャ セ メ セ セ ュュ セ ミ コッッョュョッョ セ セ ュューーアオアキオーキーウイエクエーエケケオーエュュ