From: Nicholas Van Weerdenburg Date: 2005-01-15T06:15:33+09:00 Subject: Re: Irb and Ruby Separation Thanks. I guess my question might be better phrased "why doesn't running the ruby interpreter with no input not default to interactive mode (irb) such as with the python interpreter". I'm mostly curious for no practical reason. Just wondering if there is functionality or design benefits. On Sat, 15 Jan 2005 05:59:13 +0900, Gennady Bystritksy wrote: > Nicholas Van Weerdenburg wrote: > > I've been wondering about why are irb and ruby separate programs. > > > > Python combines the two concepts in its main executable, and I was > > wondering if there was a benefit to separating them. > > > > Thanks, > > Nick > > They are not. irb is a ruby program. Here's the content of > /usr/local/bin/irb: > > #!/usr/local/bin/ruby > # > # irb.rb - intaractive ruby > # $Release Version: 0.7.3 $ > # $Revision: 1.2 $ > # $Date: 2002/11/19 02:00:18 $ > # by Keiju ISHITSUKA(keiju@ishitsuka.com) > # > > require "irb" > > if __FILE__ == $0 > IRB.start(__FILE__) > else > # check -e option > if /^-e$/ =~ $0 > IRB.start(__FILE__) > else > IRB.setup(__FILE__) > end > end > > Gennady. > > -- Nicholas Van Weerdenburg