From 88431c47baccff2b5b5e12d059f0cb1f12ef29d1 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Thu, 22 Feb 2024 22:16:41 +0900 Subject: [PATCH] [ruby/irb] Delete IRB::NotImplementedError (https://github.com/ruby/irb/pull/878) https://github.com/ruby/irb/commit/6751778948 --- lib/irb/input-method.rb | 2 +- lib/irb/lc/error.rb | 5 ----- lib/irb/lc/ja/error.rb | 5 ----- lib/irb/output-method.rb | 8 +------- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 7e839637646c98..c0e6c7e38bf702 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -20,7 +20,7 @@ class InputMethod # # See IO#gets for more information. def gets - fail NotImplementedError, "gets" + fail NotImplementedError end public :gets diff --git a/lib/irb/lc/error.rb b/lib/irb/lc/error.rb index a5ec15086595d5..25f4ba2e1cd382 100644 --- a/lib/irb/lc/error.rb +++ b/lib/irb/lc/error.rb @@ -12,11 +12,6 @@ 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.") diff --git a/lib/irb/lc/ja/error.rb b/lib/irb/lc/ja/error.rb index 50d72c4a10eff6..756b8b9afb2308 100644 --- a/lib/irb/lc/ja/error.rb +++ b/lib/irb/lc/ja/error.rb @@ -12,11 +12,6 @@ def initialize(val) super("スイッチ(#{val})が分りません") end end - class NotImplementedError < StandardError - def initialize(val) - super("`#{val}'の定義が必要です") - end - end class CantReturnToNormalMode < StandardError def initialize super("Normalモードに戻れません.") diff --git a/lib/irb/output-method.rb b/lib/irb/output-method.rb index f5ea57111d8dde..06fd37157ce0ba 100644 --- a/lib/irb/output-method.rb +++ b/lib/irb/output-method.rb @@ -9,16 +9,10 @@ module IRB # IRB::Notifier. You can define your own output method to use with Irb.new, # or Context.new class OutputMethod - 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) - raise NotImplementedError, "print" + raise NotImplementedError end # Prints the given +opts+, with a newline delimiter.