summaryrefslogtreecommitdiff
path: root/lib/e2mmap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2mmap.rb')
-rw-r--r--lib/e2mmap.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/e2mmap.rb b/lib/e2mmap.rb
index e9cbd6a63d..ba1e87dd85 100644
--- a/lib/e2mmap.rb
+++ b/lib/e2mmap.rb
@@ -134,6 +134,7 @@ module Exception2MessageMapper
def E2MM.def_exception(k, n, m, s = StandardError)
e = Class.new(s)
E2MM.instance_eval{@MessageMap[[k, e]] = m}
+ k.module_eval {remove_const(n)} if k.const_defined?(n, false)
k.const_set(n, e)
end