Skip to content

Commit

Permalink
IRB::NotImplementedError should accept no args just like ::NotImpleme…
Browse files Browse the repository at this point in the history
…ntedError
  • Loading branch information
tompng committed Feb 17, 2024
1 parent 462c128 commit 8cebeab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/irb/lc/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/irb/lc/ja/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8cebeab

Please sign in to comment.