diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-07-02 20:58:59 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-07-07 11:33:07 +0900 |
commit | cd948429223223f5e299626a4695ab30e43de2ea (patch) | |
tree | a783c861a2c6ec49d4556af2285bfc3e8c947b74 /io.c | |
parent | 7ba5c0633c228b75581c102796a484b6bf515022 (diff) |
[Bug #18892] Reset `ARGF.lineno` after reading shebang
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6097
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -9866,6 +9866,12 @@ argf_lineno_setter(VALUE val, ID id, VALUE *var) ARGF.last_lineno = ARGF.lineno = n; } +void +rb_reset_argf_lineno(long n) +{ + ARGF.last_lineno = ARGF.lineno = n; +} + static VALUE argf_gets(int, VALUE *, VALUE); /* |