Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO::Handle.getc returns too-many chars at the end of file #6258

Closed
p6rt opened this issue May 25, 2017 · 4 comments
Closed

IO::Handle.getc returns too-many chars at the end of file #6258

p6rt opened this issue May 25, 2017 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 25, 2017

Migrated from rt.perl.org#131365 (status was 'resolved')

Searchable as RT131365$

@p6rt
Copy link
Author

p6rt commented May 25, 2017

From @zoffixznet

IRC​: https://irclog.perlgeek.de/perl6-dev/2017-05-25#i_14636375

Note how the last item in the returned list contains a string with more than on character​:

15​:17 Zoffix m​: with '/tmp/foo70'.IO { .spurt​: "a♥c"; with .open { dd ( .getc xx 10 ) } }
15​:17 camelia rakudo-moar 428324​: OUTPUT​: «("a", "♥c", Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil).Seq␤»
15​:17 Zoffix m​: with '/tmp/foo70'.IO { .spurt​: "a♥cd"; with .open { dd ( .getc xx 10 ) } }
15​:17 camelia rakudo-moar 428324​: OUTPUT​: «("a", "♥", "cd", Nil, Nil, Nil, Nil, Nil, Nil, Nil).Seq␤»

@p6rt
Copy link
Author

p6rt commented Jul 14, 2017

From @jnthn

On Thu, 25 May 2017 08​:26​:18 -0700, cpan@​zoffix.com wrote​:

IRC​: https://irclog.perlgeek.de/perl6-dev/2017-05-25#i_14636375

Note how the last item in the returned list contains a string with
more than on character​:

15​:17 Zoffix m​: with '/tmp/foo70'.IO { .spurt​: "a♥c"; with .open {
dd ( .getc xx 10 ) } }
15​:17 camelia rakudo-moar 428324​: OUTPUT​: «("a", "♥c", Nil,
Nil, Nil, Nil, Nil, Nil, Nil, Nil).Seq␤»
15​:17 Zoffix m​: with '/tmp/foo70'.IO { .spurt​: "a♥cd"; with .open {
dd ( .getc xx 10 ) } }
15​:17 camelia rakudo-moar 428324​: OUTPUT​: «("a", "♥", "cd",
Nil, Nil, Nil, Nil, Nil, Nil, Nil).Seq␤»

Fixed and tested in S16-io/getc.t.

@p6rt
Copy link
Author

p6rt commented Jul 14, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 14, 2017

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 14, 2017
@p6rt p6rt added the IO label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant