diff options
author | Hiroshi SHIBATA <[email protected]> | 2022-12-01 19:45:09 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2022-12-02 09:36:39 +0900 |
commit | 652e2d8f5d0e0210a4ef3cb541504433dbae57b3 () | |
tree | 96bf0d8afb471b3a9084526b69413cab3ba3e031 /lib/syntax_suggest | |
parent | def258e77544409df507c0fa153cf40e84d65082 (diff) |
[ruby/syntax_suggest] No longer need PathnameFromMessage with SyntaxError#path.
https://bugs.ruby-lang.org/issues/19138 Co-authored-by: Nobuyoshi Nakada <[email protected]> https://.com/ruby/syntax_suggest/commit/8e1e7b3298
-rw-r--r-- | lib/syntax_suggest/core_ext.rb | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -25,15 +25,12 @@ if SyntaxError.method_defined?(:detailed_message) require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE) message = super - file = if highlight - SyntaxSuggest::PathnameFromMessage.new(super(highlight: false, **kwargs)).call.name - else - SyntaxSuggest::PathnameFromMessage.new(message).call.name - end - - io = SyntaxSuggest::MiniStringIO.new if file SyntaxSuggest.call( io: io, source: file.read, |