We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6edf0a0 commit 489ce80Copy full SHA for 489ce80
lib/error_highlight/base.rb
@@ -22,6 +22,14 @@ module ErrorHighlight
22
# snippet: String,
23
# script_lines: [String],
24
# } | nil
25
+ #
26
+ # Limitations:
27
28
+ # Currently, ErrorHighlight.spot only supports a single-line code fragment.
29
+ # Therefore, if the return value is not nil, first_lineno and last_lineno will have
30
+ # the same value. If the relevant code fragment spans multiple lines
31
+ # (e.g., Array#[] of +ary[(newline)expr(newline)]+), the method will return nil.
32
+ # This restriction may be removed in the future.
33
def self.spot(obj, **opts)
34
case obj
35
when Exception
0 commit comments