diff options
-rw-r--r-- | eval_error.c | 2 | ||||
-rw-r--r-- | vm.c | 4 |
2 files changed, 3 insertions, 3 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); @@ -1293,7 +1293,7 @@ rb_source_location(int *pline) } else { if (pline) *pline = 0; - return 0; + return Qnil; } } @@ -1301,7 +1301,7 @@ const char * rb_source_loc(int *pline) { VALUE path = rb_source_location(pline); - if (!path) return 0; + if (!NIL_P(path)) return NULL; return RSTRING_PTR(path); } |