Skip to content

Commit fbf3478

Browse files
authored
Merge pull request #766 from Shopify/at-rbs-abstract
Raise `NotImplementedError` from abstract methods
2 parents 6b432b0 + 4973ccf commit fbf3478

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/spoom/coverage/d3/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def tooltip
4242

4343
# @abstract
4444
#: -> String
45-
def script = raise("Abstract method called")
45+
def script = raise NotImplementedError, "Abstract method called"
4646
end
4747
end
4848
end

lib/spoom/coverage/d3/timeline.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def script
119119

120120
# @abstract
121121
#: -> String
122-
def plot = raise("Abstract method called")
122+
def plot = raise NotImplementedError, "Abstract method called"
123123

124124
#: -> String
125125
def x_scale

lib/spoom/coverage/report.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def body_html
7070

7171
# @abstract
7272
#: -> Array[Cards::Card]
73-
def cards = raise("Abstract method called")
73+
def cards = raise NotImplementedError, "Abstract method called"
7474

7575
#: -> String
7676
def footer_html
@@ -106,7 +106,7 @@ def html
106106

107107
# @abstract
108108
#: -> String
109-
def erb = raise("Abstract method called")
109+
def erb = raise NotImplementedError, "Abstract method called"
110110
end
111111

112112
class Snapshot < Card

lib/spoom/sorbet/lsp/structures.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module LSP
1010
module PrintableSymbol
1111
# @abstract
1212
#: (SymbolPrinter printer) -> void
13-
def accept_printer(printer) = raise("Abstract method called")
13+
def accept_printer(printer) = raise NotImplementedError, "Abstract method called"
1414
end
1515

1616
class Hover < T::Struct

lib/spoom/source/rewriter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ class PositionError < Spoom::Error; end
2929
class Edit
3030
# @abstract
3131
#: (Array[Integer]) -> void
32-
def apply(bytes) = raise("Abstract method called")
32+
def apply(bytes) = raise NotImplementedError, "Abstract method called"
3333

3434
# @abstract
3535
#: -> [Integer, Integer]
36-
def range = raise("Abstract method called")
36+
def range = raise NotImplementedError, "Abstract method called"
3737
end
3838

3939
class Insert < Edit

0 commit comments

Comments
 (0)