source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/irb/ext/math-mode.rb@ 18425

Last change on this file since 18425 was 18425, checked in by davidb, 15 years ago

Video extension to Greenstone

File size: 625 bytes
Line 
1#
2# math-mode.rb -
3# $Release Version: 0.9.5$
4# $Revision: 11708 $
5# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
6# by Keiju ISHITSUKA([email protected])
7#
8# --
9#
10#
11#
12require "mathn"
13
14module 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 CantReturnToNormalMode
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
36end
37
Note: See TracBrowser for help on using the repository browser.