[ruby/error_highlight] Add a note about the current limitation of ErrorHighlight.spot
https://github.com/ruby/error_highlight/commit/489ce80a62
This commit is contained in:
parent
5e3e4bc984
commit
d9f1b8baa3
@ -22,6 +22,14 @@ module ErrorHighlight
|
|||||||
# snippet: String,
|
# snippet: String,
|
||||||
# script_lines: [String],
|
# script_lines: [String],
|
||||||
# } | nil
|
# } | nil
|
||||||
|
#
|
||||||
|
# Limitations:
|
||||||
|
#
|
||||||
|
# Currently, ErrorHighlight.spot only supports a single-line code fragment.
|
||||||
|
# Therefore, if the return value is not nil, first_lineno and last_lineno will have
|
||||||
|
# the same value. If the relevant code fragment spans multiple lines
|
||||||
|
# (e.g., Array#[] of +ary[(newline)expr(newline)]+), the method will return nil.
|
||||||
|
# This restriction may be removed in the future.
|
||||||
def self.spot(obj, **opts)
|
def self.spot(obj, **opts)
|
||||||
case obj
|
case obj
|
||||||
when Exception
|
when Exception
|
||||||
|
Loading…
x
Reference in New Issue
Block a user