summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/irb/ext/math-mode.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ba13fb5b6a..455d63c41f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Dec 26 21:09:19 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
+
+ * lib/irb/ext/math-mode.rb: make not able to change math-mode
+ after irb starting [Bug #6302]. Patched by sho-h.
+
Wed Dec 26 12:52:36 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
* lib/irb/init.rb: change default debug level for
diff --git a/lib/irb/ext/math-mode.rb b/lib/irb/ext/math-mode.rb
index 4f3c5c18ba..067eb1e7fa 100644
--- a/lib/irb/ext/math-mode.rb
+++ b/lib/irb/ext/math-mode.rb
@@ -27,7 +27,7 @@ module IRB
# See IRB@Command+line+options and the unix manpage <code>bc(1)</code> for
# more information.
def math_mode=(opt)
- if @math_mode == true && opt == false
+ if @math_mode == true && !opt
IRB.fail CantReturnToNormalMode
return
end