diff options
Diffstat (limited to 'sample/irb.rb')
-rw-r--r-- | sample/irb.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sample/irb.rb b/sample/irb.rb new file mode 100644 index 0000000000..38d184dfd0 --- /dev/null +++ b/sample/irb.rb @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby +# +# irb.rb - intaractive ruby +# $Release Version: 0.6 $ +# $Revision$ +# $Date$ +# by Keiju ISHITSUKA(Nippon Rational Inc.) +# +# -- +# Usage: +# +# irb.rb [options] file_name opts +# +# + +require "irb/main" + +if __FILE__ == $0 + IRB.start(__FILE__) +else + # check -e option + tmp = ENV["TMP"] || ENV["TMPDIR"] || "/tmp" + if %r|#{tmp}/rb| =~ $0 + IRB.start(__FILE__) + else + IRB.initialize(__FILE__) + end +end |