summaryrefslogtreecommitdiff
path: root/lib/irb/output-method.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-11-25 05:38:09 +0900
committeraycabta <aycabta@gmail.com>2019-11-25 05:38:09 +0900
commit51ea1abb5f2ed70387dda28a5d0d9ee817367d61 (patch)
treef7eb2f57a21436682212399ecc34dcacbb5b91c2 /lib/irb/output-method.rb
parentefbca15116d4aea1588c6ba4ef0eb72c3c55c1db (diff)
Remove e2mmap dependency
Diffstat (limited to 'lib/irb/output-method.rb')
-rw-r--r--lib/irb/output-method.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/irb/output-method.rb b/lib/irb/output-method.rb
index 935a127d0a..3fda708cb0 100644
--- a/lib/irb/output-method.rb
+++ b/lib/irb/output-method.rb
@@ -10,21 +10,21 @@
#
#
-require "e2mmap"
-
module IRB
# An abstract output class for IO in irb. This is mainly used internally by
# IRB::Notifier. You can define your own output method to use with Irb.new,
# or Context.new
class OutputMethod
- extend Exception2MessageMapper
- def_exception :NotImplementedError, "Need to define `%s'"
-
+ class NotImplementedError < StandardError
+ def initialize(val)
+ super("Need to define `#{val}'")
+ end
+ end
# Open this method to implement your own output method, raises a
# NotImplementedError if you don't define #print in your own class.
def print(*opts)
- OutputMethod.Raise NotImplementedError, "print"
+ raise NotImplementedError, "print"
end
# Prints the given +opts+, with a newline delimiter.