mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Adding line numbers to the output of mirb.
Before:
> "hi"
hi
> d
(mirb):1: undefined method 'd' for main (NoMethodError)
> d
(mirb):1: undefined method 'd' for main (NoMethodError)
> "hi"
hi
> "#{'}"
line 1: unterminated string meets end of file
After
> "hi"
hi
> d
(mirb):2: undefined method 'd' for main (NoMethodError)
> d
(mirb):3: undefined method 'd' for main (NoMethodError)
> "hi"
hi
> "#{'}"
line 5: unterminated string meets end of file
This commit is contained in:
@@ -5167,7 +5167,6 @@ mrbc_filename(mrb_state *mrb, mrbc_context *c, const char *s)
|
||||
|
||||
memcpy(p, s, len + 1);
|
||||
c->filename = p;
|
||||
c->lineno = 1;
|
||||
}
|
||||
return c->filename;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user