From: badboy Date: 2009-03-15T22:22:49+09:00 Subject: Re: How can I know if a program is running inside irb? 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