Skip to content

Commit

Permalink
[ruby/irb] Delete IRB::NotImplementedError
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng authored and matzbot committed Feb 22, 2024
1 parent 183c574 commit 88431c4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/irb/input-method.rb
Expand Up @@ -20,7 +20,7 @@ class InputMethod
#
# See IO#gets for more information.
def gets
fail NotImplementedError, "gets"
fail NotImplementedError
end
public :gets

Expand Down
5 changes: 0 additions & 5 deletions lib/irb/lc/error.rb
Expand Up @@ -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.")
Expand Down
5 changes: 0 additions & 5 deletions lib/irb/lc/ja/error.rb
Expand Up @@ -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モードに戻れません.")
Expand Down
8 changes: 1 addition & 7 deletions lib/irb/output-method.rb
Expand Up @@ -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.
Expand Down

0 comments on commit 88431c4

Please sign in to comment.