mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove e2mmap dependency
This commit is contained in:
parent
efbca15116
commit
51ea1abb5f
11 changed files with 157 additions and 67 deletions
|
@ -9,24 +9,63 @@
|
|||
#
|
||||
#
|
||||
#
|
||||
require "e2mmap"
|
||||
|
||||
# :stopdoc:
|
||||
module IRB
|
||||
|
||||
# exceptions
|
||||
extend Exception2MessageMapper
|
||||
def_exception :UnrecognizedSwitch, "Unrecognized switch: %s"
|
||||
def_exception :NotImplementedError, "Need to define `%s'"
|
||||
def_exception :CantReturnToNormalMode, "Can't return to normal mode."
|
||||
def_exception :IllegalParameter, "Invalid parameter(%s)."
|
||||
def_exception :IrbAlreadyDead, "Irb is already dead."
|
||||
def_exception :IrbSwitchedToCurrentThread, "Switched to current thread."
|
||||
def_exception :NoSuchJob, "No such job(%s)."
|
||||
def_exception :CantShiftToMultiIrbMode, "Can't shift to multi irb mode."
|
||||
def_exception :CantChangeBinding, "Can't change binding to (%s)."
|
||||
def_exception :UndefinedPromptMode, "Undefined prompt mode(%s)."
|
||||
def_exception :IllegalRCGenerator, 'Define illegal RC_NAME_GENERATOR.'
|
||||
|
||||
class UnrecognizedSwitch < StandardError
|
||||
def initialize(val)
|
||||
super("Unrecognized switch: #{val}")
|
||||
end
|
||||
end
|
||||
class NotImplementedError < StandardError
|
||||
def initialize(val)
|
||||
super("Need to define `#{val}'")
|
||||
end
|
||||
end
|
||||
class CantReturnToNormalMode < StandardError
|
||||
def initialize
|
||||
super("Can't return to normal mode.")
|
||||
end
|
||||
end
|
||||
class IllegalParameter < StandardError
|
||||
def initialize(val)
|
||||
super("Invalid parameter(#{val}).")
|
||||
end
|
||||
end
|
||||
class IrbAlreadyDead < StandardError
|
||||
def initialize
|
||||
super("Irb is already dead.")
|
||||
end
|
||||
end
|
||||
class IrbSwitchedToCurrentThread < StandardError
|
||||
def initialize
|
||||
super("Switched to current thread.")
|
||||
end
|
||||
end
|
||||
class NoSuchJob < StandardError
|
||||
def initialize(val)
|
||||
super("No such job(#{val}).")
|
||||
end
|
||||
end
|
||||
class CantShiftToMultiIrbMode < StandardError
|
||||
def initialize
|
||||
super("Can't shift to multi irb mode.")
|
||||
end
|
||||
end
|
||||
class CantChangeBinding < StandardError
|
||||
def initialize(val)
|
||||
super("Can't change binding to (#{val}).")
|
||||
end
|
||||
end
|
||||
class UndefinedPromptMode < StandardError
|
||||
def initialize(val)
|
||||
super("Undefined prompt mode(#{val}).")
|
||||
end
|
||||
end
|
||||
class IllegalRCGenerator < StandardError
|
||||
def initialize
|
||||
super("Define illegal RC_NAME_GENERATOR.")
|
||||
end
|
||||
end
|
||||
end
|
||||
# :startdoc:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue