From: "Michael W. Ryder" <_mwryder@...> Date: 2007-01-23T11:15:05+09:00 Subject: Re: Placing tabs in strings in irb George Ogata wrote: > On 1/23/07, Michael W. Ryder <_mwryder@worldnet.att.net> wrote: >> Is there any reason I cannot embed tabs in a string while using irb? I >> am trying to create a string using tabs to separate the various values >> for testing -- i.e. a = '1 2 3 4'. Using irb it >> either ignores the tab >> character or places a random value in the string. >> On a related note why is the value for the above string '1' if I use >> a.to_i to display it? I would have expected an error. > > I'm guessing this behavior is due to readline, which is normally > compiled into into irb if available. If so, you can also insert tabs > using M-TAB (a.k.a. alt-tab). Try "info readline" for more info (or > google "info readline" if you don't have it available). > Using alt-tab on my XP Pro computer results in another window popping up and does not insert a tab character into the string. I will just have to remember to use double quotes and \t for tabs.