From 7a666c67664053df9e749cc81d17a2312881d436 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 16 Nov 2017 05:35:58 +0000 Subject: rb_source_location() may return nil. * vm.c (rb_source_location): return nil if path is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval_error.c') diff --git a/eval_error.c b/eval_error.c index fa9fa8cdab..e8a1691036 100644 --- a/eval_error.c +++ b/eval_error.c @@ -32,7 +32,7 @@ error_pos_str(void) int sourceline; VALUE sourcefile = rb_source_location(&sourceline); - if (sourcefile) { + if (!NIL_P(sourcefile)) { ID caller_name; if (sourceline == 0) { return rb_sprintf("%"PRIsVALUE": ", sourcefile); -- cgit v1.2.3