diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-06-04 09:24:17 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-06-04 09:24:17 +0900 |
commit | aa8d393d8a69d1a5780d338692f75e2dd821c5b0 (patch) | |
tree | e1fd917a1fb60972107646eb987dc23307a04b7c /ruby.c | |
parent | 9a07915ae21d5a8e39d7dab6b609be033f2e2d7d (diff) |
EOF by 2 ^D on a TTY
Terminate the input from a TTY by 2 ^D at the middle of line, like
as many programs, `cat`, `perl` and so on, do. By the first ^D,
the line will be sent without a newline, and then EOF will be send
by the next ^D.
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2011,7 +2011,7 @@ load_file_internal(VALUE argp_v) else if (!NIL_P(c)) { rb_io_ungetbyte(f, c); } - else { + if (NIL_P(c)) { argp->f = f = Qnil; } if (!(opt->dump & ~DUMP_BIT(version_v))) { |