diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-09-03 15:33:35 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-09-03 15:33:35 +0900 |
| commit | 4e8317f5df061db63600113123a83c6572f6c63f (patch) | |
| tree | 5aa14e11119c646eb0837104c4929db16e0c3490 /src/error.c | |
| parent | 4f7a1a167db8a3373b356540eaee21f9cf93e7f2 (diff) | |
| download | mruby-4e8317f5df061db63600113123a83c6572f6c63f.tar.gz mruby-4e8317f5df061db63600113123a83c6572f6c63f.zip | |
do no generate lineno info if no filename is specified
Diffstat (limited to 'src/error.c')
| -rw-r--r-- | src/error.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.c b/src/error.c index da8786650..6d05a3c6c 100644 --- a/src/error.c +++ b/src/error.c @@ -191,7 +191,7 @@ exc_debug_info(mrb_state *mrb, struct RObject *exc) if (ci->proc && !MRB_PROC_CFUNC_P(ci->proc)) { mrb_irep *irep = ci->proc->body.irep; - if (irep->lines && irep->iseq <= pc && pc < irep->iseq + irep->ilen) { + if (irep->filename && irep->lines && irep->iseq <= pc && pc < irep->iseq + irep->ilen) { mrb_obj_iv_set(mrb, exc, mrb_intern(mrb, "file"), mrb_str_new_cstr(mrb, irep->filename)); mrb_obj_iv_set(mrb, exc, mrb_intern(mrb, "line"), mrb_fixnum_value(irep->lines[pc - irep->iseq - 1])); return; |
