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

default $.nl-in on IO::Handle does not correctly work in subclasses #6434

Closed
p6rt opened this issue Aug 8, 2017 · 6 comments
Closed

default $.nl-in on IO::Handle does not correctly work in subclasses #6434

p6rt opened this issue Aug 8, 2017 · 6 comments
Labels
regression Issue did not exist previously testneeded

Comments

@p6rt
Copy link

p6rt commented Aug 8, 2017

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

Searchable as RT131858$

@p6rt
Copy link
Author

p6rt commented Aug 8, 2017

From @zoffixznet

Currently, this causes breakage in IO​::String

  zoffix@​VirtualBox~$ perl6 -e 'class Z is IO​::Handle { method x { dd $.nl-in } }.new.x;'
  $["\n"]

  zoffix@​VirtualBox~$ perl6 -v
  This is Rakudo version 2017.07-138-ga91ad2d built on MoarVM version 2017.07-318-g604da4d

Above, it should give the two-element array, with "\r\n" as another element.

AlexDaniel bisected my original code[^1] to point to https://gist.github.com/Whateverable/b26f4103f5da0809e11749b50fdbabb4
¦c63c57e9a823^​: «"hello,"» ¦c63c57e​: «"hello,\r\nworld!\r\n"»

I tried to golf it further, by taking all the relevant bits from IO​::Handle into a custom class, but failed to reproduce the issue then.

[1] https://gist.github.com/zoffixznet/0c2cbd7acaaf0d3b27d245ad2e2bc737

@p6rt
Copy link
Author

p6rt commented Aug 8, 2017

From @lizmat

reverted c63c57e9a823303e74c06 for now

On 8 Aug 2017, at 12​:21, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​131858]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131858 >

Currently, this causes breakage in IO​::String

zoffix@​VirtualBox~$ perl6 -e 'class Z is IO​::Handle { method x { dd $.nl-in } }.new.x;'
$["\n"]

zoffix@​VirtualBox~$ perl6 -v
This is Rakudo version 2017.07-138-ga91ad2d built on MoarVM version 2017.07-318-g604da4d

Above, it should give the two-element array, with "\r\n" as another element.

AlexDaniel bisected my original code[^1] to point to https://gist.github.com/Whateverable/b26f4103f5da0809e11749b50fdbabb4
¦c63c57e9a823^​: «"hello,"» ¦c63c57e​: «"hello,\r\nworld!\r\n"»

I tried to golf it further, by taking all the relevant bits from IO​::Handle into a custom class, but failed to reproduce the issue then.

[1] https://gist.github.com/zoffixznet/0c2cbd7acaaf0d3b27d245ad2e2bc737

@p6rt
Copy link
Author

p6rt commented Aug 8, 2017

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

@p6rt
Copy link
Author

p6rt commented Mar 11, 2018

From @dogbert17

On Tue, 08 Aug 2017 04​:19​:24 -0700, elizabeth wrote​:

reverted c63c57e9a823303e74c06 for now

On 8 Aug 2017, at 12​:21, Zoffix Znet (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​131858]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131858 >

Currently, this causes breakage in IO​::String

zoffix@​VirtualBox~$ perl6 -e 'class Z is IO​::Handle { method x { dd
$.nl-in } }.new.x;'
$["\n"]

zoffix@​VirtualBox~$ perl6 -v
This is Rakudo version 2017.07-138-ga91ad2d built on MoarVM version
2017.07-318-g604da4d

Above, it should give the two-element array, with "\r\n" as another
element.

AlexDaniel bisected my original code[^1] to point to
https://gist.github.com/Whateverable/b26f4103f5da0809e11749b50fdbabb4
¦c63c57e9a823^​: «"hello,"» ¦c63c57e​: «"hello,\r\nworld!\r\n"»

I tried to golf it further, by taking all the relevant bits from
IO​::Handle into a custom class, but failed to reproduce the issue
then.

[1]
https://gist.github.com/zoffixznet/0c2cbd7acaaf0d3b27d245ad2e2bc737

It seems as if everything is still good after the revert
((2017-08-08) rakudo/rakudo@6745517 ),
tests needed,

@p6rt
Copy link
Author

p6rt commented Apr 8, 2018

From @AlexDaniel

There's now a regression test in Raku/roast@a7af874

Closing (but please take a look at that roast commit)

On 2018-03-11 13​:11​:21, jan-olof.hendig@​bredband.net wrote​:

On Tue, 08 Aug 2017 04​:19​:24 -0700, elizabeth wrote​:

reverted c63c57e9a823303e74c06 for now

On 8 Aug 2017, at 12​:21, Zoffix Znet (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​131858]
# in the subject line of all future correspondence about this
issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131858 >

Currently, this causes breakage in IO​::String

zoffix@​VirtualBox~$ perl6 -e 'class Z is IO​::Handle { method x { dd
$.nl-in } }.new.x;'
$["\n"]

zoffix@​VirtualBox~$ perl6 -v
This is Rakudo version 2017.07-138-ga91ad2d built on MoarVM version
2017.07-318-g604da4d

Above, it should give the two-element array, with "\r\n" as another
element.

AlexDaniel bisected my original code[^1] to point to
https://gist.github.com/Whateverable/b26f4103f5da0809e11749b50fdbabb4
¦c63c57e9a823^​: «"hello,"» ¦c63c57e​: «"hello,\r\nworld!\r\n"»

I tried to golf it further, by taking all the relevant bits from
IO​::Handle into a custom class, but failed to reproduce the issue
then.

[1]
https://gist.github.com/zoffixznet/0c2cbd7acaaf0d3b27d245ad2e2bc737

It seems as if everything is still good after the revert
((2017-08-08)
rakudo/rakudo@6745517
),
tests needed,

@p6rt
Copy link
Author

p6rt commented Apr 8, 2018

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

@p6rt p6rt closed this as completed Apr 8, 2018
@p6rt p6rt added regression Issue did not exist previously testneeded labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously testneeded
Projects
None yet
Development

No branches or pull requests

1 participant