[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How can I know if a program is running inside irb?

arcadio

3/15/2009 1:10:00 PM

Hi,

from a certain piece of code, how can I know if it's been run inside
irb, or just ruby. I've tried looking in the IRB rdoc, but haven't
found any relevant methods.

Thanks in advance.
11 Answers

stuthalblum@comcast.net

3/13/2009 7:10:00 PM

0

On Mar 13, 11:19 am, fearless freep <dntroa...@aol.com> wrote:
> On Mar 13, 10:57 am, "stuthalb...@comcast.net"
>
>
>
>
>
> <stuthalb...@comcast.net> wrote:
> > On Mar 12, 6:33 pm, Joe <obri6...@aol.com> wrote:
>
> > > ahhh...this is better than those SETI programs that hope to contact
> > > aliens....
> > > Sittin' in the ole' barcalounger....eatin' pizza...cell phone at the
> > > ready...
> > > monitoring Texas border cams....
> > > and rattin' out the aliens to the border patrol :-)
>
> > > Who says American ain't a great country?
>
> > I've been meaning to ask you, Joe.
>
> > Once you have the entire Mexican border walled off like East Germany.
> > And the Canadian border, too, while you're at it.  Yup, all 7,500
> > miles.
>
> > What do you do about the other HALF of the illegal aliens who come
> > here legally, through borders, and overstay their student, work, or
> > visitor visas?
>
> > Do we go whole-hog police state, and start random busts, asking
> > everybody for proof of residency on the street, at random traffic
> > stops, etc.  Enjoy those frequent knocks on the door with the border
> > patrols demanding to search everyone's houses, and demand proof of
> > residency of all occupants.
>
> > Sorry, Joe, I thought I lived in AMERICA.
>
> I'd be willing to bet Joe would be very much in favor of rounding them
> up and putting them in cattle cars heading south.
>
> For Gods sake, they're Mexicans.  We wouldn't want to treat them like
> human beings.- Hide quoted text -
>
> - Show quoted text -

The half that DON'T come across the Mexican border, that overstay
visas of various types; most of those are NOT Mexicans. That's HALF
of all out-of-status aliens.

Joe

3/14/2009 1:23:00 AM

0

On Mar 13, 10:57 am, "stuthalb...@comcast.net"
<stuthalb...@comcast.net> wrote:

> I've been meaning to ask you, Joe.
>
> Once you have the entire Mexican border walled off like East Germany.
> And the Canadian border, too, while you're at it.  Yup, all 7,500
> miles.
>
> What do you do about the other HALF of the illegal aliens who come
> here legally, through borders, and overstay their student, work, or
> visitor visas?
>
> Do we go whole-hog police state, and start random busts, asking
> everybody for proof of residency on the street, at random traffic
> stops, etc.

Not a bad idea. We do it for driver's license checks and DUI checks. I
think you hit on something...I like it :-)


Joe

3/14/2009 1:25:00 AM

0

On Mar 13, 11:19 am, fearless freep <dntroa...@aol.com> wrote:


> I'd be willing to bet Joe would be very much in favor of rounding them
> up and putting them in cattle cars heading south.

You have no clue what Joe would be in favor of. Cattle cars are
barbaric. Greyhound buses would do just fine. Yeah, that would do
fine. Thousand of buses heading south, containing people who have NO
RIGHT to be here and are in violation of our laws. Sounds good to
me :-)

>
> For Gods sake, they're Mexicans.  We wouldn't want to treat them like
> human beings.

No, they're many different races and nationalities. They're Irish
too...throw them all the fuck out if they can't obey our laws....


Jan-Erik R.

3/15/2009 1:23:00 PM

0

abc schrieb:
> Hi,
>
> from a certain piece of code, how can I know if it's been run inside
> irb, or just ruby. I've tried looking in the IRB rdoc, but haven't
> found any relevant methods.
>
> Thanks in advance.
>
if it is really necessary (I don't know why it should be) maybe it's an
option to use
Object.const_defined? :IRB

Thomas Preymesser

3/15/2009 1:33:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

2009/3/15 abc <arcadiorubiogarcia@gmail.com>

> Hi,
>
> from a certain piece of code, how can I know if it's been run inside
> irb, or just ruby. I've tried looking in the IRB rdoc, but haven't
> found any relevant methods.


see the gem sys-proctable!

-Thomas


--
Thomas Preymesser
thopre@gmail.com
http://thopre.google...
http://thopre.word...

Jean Anouilh - "What you get free costs too much."

arcadio

3/15/2009 1:37:00 PM

0

On 15 mar, 14:22, badboy <bad...@heartofgold.co.cc> wrote:
> abc schrieb:> Hi,
>
> > from a certain piece of code, how can I know if it's been run inside
> > irb, or just ruby. I've tried looking in the IRB rdoc, but haven't
> > found any relevant methods.
>
> > Thanks in advance.
>
> if it is really necessary  (I don't know why it should be) maybe it's an
> option to use
> Object.const_defined? :IRB

Thanks. It's just a bit of an ugly hack to know whether I should start
a Curses interface or not. A curses interface misbehaves within irb
since irb is also using curses. That's all.

stuthalblum@comcast.net

3/16/2009 6:08:00 PM

0

On Mar 13, 9:22 pm, Joe <obri6...@aol.com> wrote:
> On Mar 13, 10:57 am, "stuthalb...@comcast.net"
>
> <stuthalb...@comcast.net> wrote:
> > I've been meaning to ask you, Joe.
>
> > Once you have the entire Mexican border walled off like East Germany.
> > And the Canadian border, too, while you're at it.  Yup, all 7,500
> > miles.
>
> > What do you do about the other HALF of the illegal aliens who come
> > here legally, through borders, and overstay their student, work, or
> > visitor visas?
>
> > Do we go whole-hog police state, and start random busts, asking
> > everybody for proof of residency on the street, at random traffic
> > stops, etc.
>
> Not a bad idea. We do it for driver's license checks and DUI checks. I
> think you hit on something...I like it :-)

Actually, we don't. Random checks are unconstitutional. You can only
do universal stops or stops for probable cause.

stuthalblum@comcast.net

3/16/2009 10:24:00 PM

0

On Mar 13, 9:24 pm, Joe <obri6...@aol.com> wrote:
> On Mar 13, 11:19 am, fearless freep <dntroa...@aol.com> wrote:
>
> > I'd be willing to bet Joe would be very much in favor of rounding them
> > up and putting them in cattle cars heading south.
>
> You have no clue what Joe would be in favor of. Cattle cars are
> barbaric. Greyhound buses would do just fine. Yeah, that would do
> fine. Thousand of buses heading south, containing people who have NO
> RIGHT to be here and are in violation of our laws. Sounds good to
> me :-)
>
>
>
> > For Gods sake, they're Mexicans.  We wouldn't want to treat them like
> > human beings.
>
> No, they're many different races and nationalities. They're Irish
> too...throw them all the fuck out if they can't obey our laws....

So why are you sending them all to Mexico?

Joe

3/17/2009 11:59:00 AM

0

On Mar 16, 6:23 pm, "stuthalb...@comcast.net"
<stuthalb...@comcast.net> wrote:


> So why are you sending them all to Mexico?

Well, estimates say that 80 percent of our illegals come from South of
our southern border. I'm all for marchin' the others on cruise ships
to Dublin and points east.

Bottom line bein' ....if ya ain't got a right to be here...you
shouldn't be here. That don't take a college degree to cipher.....

stuthalblum@comcast.net

3/17/2009 1:50:00 PM

0

On Mar 17, 7:59 am, Joe <obri6...@aol.com> wrote:
> On Mar 16, 6:23 pm, "stuthalb...@comcast.net"
>
> <stuthalb...@comcast.net> wrote:
> > So why are you sending them all to Mexico?
>
> Well, estimates say that 80 percent of our illegals come from South of
> our southern border. I'm all for marchin' the others on cruise ships
> to Dublin and points east.

I've heard different estimates. The ones I heard are that 50% of out-
of-status aliens arrived LEGALLY on visitor, student or work visas and
overstayed.

That seems inconsistent with your 80% figure.