--f46d043bdb76e10e1a04beaf68b0
Content-Type: text/plain; charset=UTF-8

On Apr 27, 2012 3:29 PM, "Aaron Patterson" <tenderlove / ruby-lang.org> wrote:
>
> On Sat, Apr 28, 2012 at 05:22:47AM +0900, Ryan Davis wrote:
> >
> > On Apr 27, 2012, at 11:51 , Intransition wrote:
> >
> > > Is there any global variable in Ruby for specifying how tabs ("\t")
should be translated into spaces?
> >
> > Huh?
> >
> > Where would this global be used, exactly?
>
> I think the variable is
$NUMBER_OF_SPACES_PER_TAB_FOR_TRANSLATION_SUBSTITUTIONS.
>
> Here is the usage:
>
>  $NUMBER_OF_SPACES_PER_TAB_FOR_TRANSLATION_SUBSTITUTIONS  
>
>  string.gsub(/\t/, ' ' *
$NUMBER_OF_SPACES_PER_TAB_FOR_TRANSLATION_SUBSTITUTIONS)
>
> Hope that helps!
>
> --
> Aaron Patterson
> http://tenderlovemaking.com/

LOL.

Intransition: the amount of space shown by a tab is totally dependent on
the terminal used to display the text, and (unlike some terminal
parameters) there is no way for Ruby or any language to change it. I guess
the best thing you could do would be to implement a writer stream that
converted tabs to spaces.

--f46d043bdb76e10e1a04beaf68b0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p>On Apr 27, 2012 3:29 PM, &quot;Aaron Patterson&quot; &lt;tenderlove / ruby-lang.org&gt; wrote:<br>
&gt;<br>
&gt; On Sat, Apr 28, 2012 at 05:22:47AM +0900, Ryan Davis wrote:<br>
&gt; &gt;<br>
&gt; &gt; On Apr 27, 2012, at 11:51 , Intransition wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Is there any global variable in Ruby for specifying how tabs&quot;\t&quot;) should be translated into spaces?<br>
&gt; &gt;<br>
&gt; &gt; Huh?<br>
&gt; &gt;<br>
&gt; &gt; Where would this global be used, exactly?<br>
&gt;<br>
&gt; I think the variable is $NUMBER_OF_SPACES_PER_TAB_FOR_TRANSLATION_SUBSTITUTIONS.<br>
&gt;<br>
&gt; Here is the usage:<br>
&gt;<br>
&gt; $NUMBER_OF_SPACES_PER_TAB_FOR_TRANSLATION_SUBSTITUTIONS = 4<br>
&gt;<br>
&gt; string.gsub(/\t/, &#39; &#39; * $NUMBER_OF_SPACES_PER_TAB_FOR_TRANSLATION_SUBSTITUTIONS)<br>
&gt;<br>
&gt; Hope that helps!<br>
&gt;<br>
&gt; --<br>
&gt; Aaron Patterson<br>
&gt; http://tenderlovemaking.com/</p>
<p>LOL.</p>
<p>Intransition: the amount of space shown by a tab is totally dependent onhe terminal used to display the text, and (unlike some terminal parameters) there is no way for Ruby or any language to change it. I guess the best thing you could do would be to implement a writer stream that converted tabs to spaces.<br>

</p>

--f46d043bdb76e10e1a04beaf68b0--