diff options
Diffstat (limited to 'mrbgems/mruby-compiler')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 6548eb18c..306036275 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -2936,10 +2936,11 @@ var_ref : variable } | keyword__FILE__ { - if (!p->filename) { - p->filename = "(null)"; + const char *fn = p->filename; + if (!fn) { + fn = "(null)"; } - $$ = new_str(p, p->filename, strlen(p->filename)); + $$ = new_str(p, fn, strlen(fn)); } | keyword__LINE__ { |
