From 8cebeabbce50757fcf27f12a897e9ff799373f3e Mon Sep 17 00:00:00 2001 From: tompng Date: Sat, 17 Feb 2024 22:01:03 +0900 Subject: [PATCH] IRB::NotImplementedError should accept no args just like ::NotImplementedError --- lib/irb/lc/error.rb | 4 ++-- lib/irb/lc/ja/error.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/irb/lc/error.rb b/lib/irb/lc/error.rb index a5ec15086..f5f621318 100644 --- a/lib/irb/lc/error.rb +++ b/lib/irb/lc/error.rb @@ -13,8 +13,8 @@ def initialize(val) end end class NotImplementedError < StandardError - def initialize(val) - super("Need to define `#{val}'") + def initialize(val = nil) + super("Need to define #{val || "method"}") end end class CantReturnToNormalMode < StandardError diff --git a/lib/irb/lc/ja/error.rb b/lib/irb/lc/ja/error.rb index 50d72c4a1..b2a085b40 100644 --- a/lib/irb/lc/ja/error.rb +++ b/lib/irb/lc/ja/error.rb @@ -13,8 +13,8 @@ def initialize(val) end end class NotImplementedError < StandardError - def initialize(val) - super("`#{val}'の定義が必要です") + def initialize(val = nil) + super("#{val || "メソッド"}の定義が必要です") end end class CantReturnToNormalMode < StandardError