home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rbemx144.zip / ruby-1.4.4 / sample / irb.rb < prev    next >
Text File  |  1999-09-15  |  572b  |  31 lines

  1. #!/usr/local/bin/ruby
  2. #
  3. #   irb.rb - intaractive ruby
  4. #       $Release Version: 0.6 $
  5. #       $Revision: 1.1 $
  6. #       $Date: 1999/03/05 03:11:33 $
  7. #       by Keiju ISHITSUKA(Nippon Rational Inc.)
  8. #
  9. # --
  10. # Usage:
  11. #
  12. #   irb.rb [options] file_name opts
  13. #
  14. #       Refer README about details of using irb .
  15. #    (JP: $B>\$7$/$O(BREADME$B$r;2>H$7$F2<$5$$(B.)
  16. #
  17.  
  18. require "irb/main"
  19.  
  20. if __FILE__ == $0
  21.   IRB.start(__FILE__)
  22. else
  23.   # check -e option
  24.   tmp = ENV["TMP"] || ENV["TMPDIR"] || "/tmp"
  25.   if %r|#{tmp}/rb| =~ $0
  26.     IRB.start(__FILE__)
  27.   else
  28.     IRB.initialize(__FILE__)
  29.   end
  30. end
  31.