mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00

(https://github.com/ruby/irb/pull/901)
* Always save irb_history in HOME or XDG_CONFIG_HOME
Also split irbrc search logic from irb_history search logic as a refactor
* Remove IRB.conf[:RC_NAME_GENERATOR] because it's not configurable
This conf is used to specify which irbrc to load. Need to configure before irbrc is loaded, so it's actually not configurable.
This conf is also used for history file search, but it is configurable by conf[:HISTORY_FILE].
* remove rc_file_test because it is tested with rc_files, remove useless test setup
* Make internal irbrc searching method private
11d03a6ff7
52 lines
1.1 KiB
Ruby
52 lines
1.1 KiB
Ruby
# frozen_string_literal: true
|
|
#
|
|
# irb/lc/error.rb -
|
|
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
|
|
#
|
|
|
|
module IRB
|
|
# :stopdoc:
|
|
|
|
class UnrecognizedSwitch < StandardError
|
|
def initialize(val)
|
|
super("Unrecognized switch: #{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 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
|
|
|
|
# :startdoc:
|
|
end
|