DEFINITIONS
This source file includes following functions.
1 #
2 # math-mode.rb -
3 # $Release Version: 0.9$
4 # $Revision: 1.1 $
5 # $Date: 2002/07/09 11:17:17 $
6 # by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)
7 #
8 # --
9 #
10 #
11 #
12 require "mathn"
13
14 module IRB
15 class Context
16 attr_reader :math_mode
17 alias math? math_mode
18
19 def math_mode=(opt)
20 if @math_mode == true && opt == false
21 IRB.fail CantRetuenNormalMode
22 return
23 end
24
25 @math_mode = opt
26 if math_mode
27 main.extend Math
28 print "start math mode\n" if verbose?
29 end
30 end
31
32 def inspect?
33 @inspect_mode.nil? && !@math_mode or @inspect_mode
34 end
35 end
36 end
37