summaryrefslogtreecommitdiff
path: root/sample/irb.rb
blob: 38d184dfd0be52184a28ab60f8a3cbcf39cd99db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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