-
Notifications
You must be signed in to change notification settings - Fork 1
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::tell return 0, no matter what #3687
Comments
From @gfldex$f = open("x", :w); $f.print("abc"); say $f.tell returns 0, expected 3 |
From @pmqsOn Sun Feb 15 06:46:01 2015, gfldex wrote:
tell seems to return the correct value when "seek" is called and when reading from a file. Issue only seems to be when writing. Attached is a simple test harness for "tell". |
From @pmqsuse v6; plan 10; # L<S32::IO/Functions/tell> { my $test-path = "tempfile-tell-test"; { my $fh = open($test-path, :w); is $fh.tell, 0, "tell after opening file is 0"; ok $fh.seek(2, 0), "seek to offset 2"; ok $fh.close(), "closed ok"; dies_ok { $fh.tell }, "tell() on closed file fails"; } { my $fh = open($test-path, :a); ok $fh.close(), "closed ok"; { my $fh = open($test-path, :r); is $fh.tell, 0, "tell after opening file for reading is 0"; ok $fh.close(), "closed ok"; dies_ok { $fh.tell }, "tell() on closed file fails"; } unlink $test-path; # vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetSeems to be fixed in latest Rakudo, per http://irclog.perlgeek.de/perl6/2016-09-26#i_13283196 Tests needed. |
From @zoffixznetOn Mon, 26 Sep 2016 05:37:11 -0700, cpan@zoffix.com wrote:
Tests added in Raku/roast@ea137f64d3 - IO grant |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123838 (status was 'resolved')
Searchable as RT123838$
The text was updated successfully, but these errors were encountered: