R
RLMuller
This is a multi-part message in MIME format.
------=_NextPart_000_001C_01C379F4.77D53B30
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi All,
Does Ruby offer a global variable like $. or a global method that =
provides the line-number in which it appears as opposed to the last line =
scanned by Ruby?
I've assembled a large script of examples from various Ruby web sites, =
which in turn produces a lot of output. It'd be nice if I could just =
paste in puts "#{$something}" at various points so that a reader =
perusing a portion of the output could easily locate the source code =
that generated it.
It's no big deal. Ruby seems to have everything in the world in it, so =
I thought it might have this, too, though I couldn't find it.
Regards,
Richard
A programmer is a device for turning coffee into code.
Jeff Prosise (with an assist from Paul Erdos)
------=_NextPart_000_001C_01C379F4.77D53B30
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi All,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Does Ruby offer a global variable like $. or a =
global method=20
that provides the line-number in which it appears as opposed to the last =
line=20
scanned by Ruby?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>I've assembled a large script of examples from =
various Ruby=20
web sites, which in turn produces a lot of output. It'd be =
nice if I=20
could just paste in puts "#{$something}" at various points so that a =
reader=20
perusing a portion of the output could easily locate the source code =
that=20
generated it.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>It's no big deal. Ruby seems to have =
everything in the=20
world in it, so I thought it might have this, too, though I couldn't =
find=20
it.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Regards,<BR>Richard</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>A programmer is a device for turning coffee into =
code.<BR>Jeff=20
Prosise (with an assist from Paul Erdos)<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_001C_01C379F4.77D53B30--
------=_NextPart_000_001C_01C379F4.77D53B30
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi All,
Does Ruby offer a global variable like $. or a global method that =
provides the line-number in which it appears as opposed to the last line =
scanned by Ruby?
I've assembled a large script of examples from various Ruby web sites, =
which in turn produces a lot of output. It'd be nice if I could just =
paste in puts "#{$something}" at various points so that a reader =
perusing a portion of the output could easily locate the source code =
that generated it.
It's no big deal. Ruby seems to have everything in the world in it, so =
I thought it might have this, too, though I couldn't find it.
Regards,
Richard
A programmer is a device for turning coffee into code.
Jeff Prosise (with an assist from Paul Erdos)
------=_NextPart_000_001C_01C379F4.77D53B30
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi All,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Does Ruby offer a global variable like $. or a =
global method=20
that provides the line-number in which it appears as opposed to the last =
line=20
scanned by Ruby?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>I've assembled a large script of examples from =
various Ruby=20
web sites, which in turn produces a lot of output. It'd be =
nice if I=20
could just paste in puts "#{$something}" at various points so that a =
reader=20
perusing a portion of the output could easily locate the source code =
that=20
generated it.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>It's no big deal. Ruby seems to have =
everything in the=20
world in it, so I thought it might have this, too, though I couldn't =
find=20
it.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Regards,<BR>Richard</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>A programmer is a device for turning coffee into =
code.<BR>Jeff=20
Prosise (with an assist from Paul Erdos)<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_001C_01C379F4.77D53B30--