aboutsummaryrefslogtreecommitdiffstats
path: root/eval_error.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 05:35:58 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 05:35:58 +0000
commitf6c20fdbea460b65fdd4ac32ebae88a1edebbada (patch)
tree5de1660d0ad3125cee29d9d8e675bd42f329c5ff /eval_error.c
parentddf155ad78d13f40afd3c58881ee66beb74a60cd (diff)
downloadruby-f6c20fdbea460b65fdd4ac32ebae88a1edebbada.tar.gz
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
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c2
1 files changed, 1 insertions, 1 deletions
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);