mkmf.rb: Prefer caller_locations over parsing caller

This commit is contained in:
Nobuyoshi Nakada 2023-01-09 18:30:05 +09:00
parent 0a2bf5f1e2
commit 0d7bbfc941
Notes: git 2023-01-09 12:44:43 +00:00

View File

@ -971,7 +971,11 @@ SRC
# Internal use only.
#
def checking_for(m, fmt = nil)
f = caller[0][/in `([^<].*)'$/, 1] and f << ": " #` for vim #'
if f = caller_locations(1, 1).first.base_label and /\A\w/ =~ f
f += ": "
else
f = ""
end
m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... "
message "%s", m
a = r = nil