Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #112276] [TODO] Implement 0-arg slurp in Rakudo

5 views
Skip to first unread message

Carl Mäsak

unread,
Apr 5, 2012, 8:44:37 AM4/5/12
to bugs-bi...@rt.perl.org
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #112276]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112276 >


<moritz> p6: say $*IN.slurp.comb(/e/).elems
<p6eval> rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«88␤»
<masak> r: say slurp.comb(/e/).elems
<p6eval> rakudo 4373f0: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling
'slurp' will never work with no arguments (line 1)␤Expected any of:␤
:(Any $filename)␤»
<masak> how come lines() defaults to $*IN, but slurp() doesn't?
<moritz> not $*IN, $*ARGFILES
<moritz> ... and I don't know
<masak> they feel somehow analogous.
<moritz> agreed
* masak patches the spec
<masak> oh, and S32/IO already has it that way. it's just that Rakudo
doesn't implement it.
* masak submits rakudo todo-ticket
<moritz> masak: now spectesting a fix
<masak> moritz++

Will Coleda via RT

unread,
Nov 20, 2012, 9:56:50 PM11/20/12
to perl6-c...@perl.org
On Thu Apr 05 05:44:37 2012, masak wrote:
> <moritz> p6: say $*IN.slurp.comb(/e/).elems
> <p6eval> rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«88␤»
> <masak> r: say slurp.comb(/e/).elems

Both of these now say 88. Closable with tests.

> <p6eval> rakudo 4373f0: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling
> 'slurp' will never work with no arguments (line 1)␤Expected any of:␤
> :(Any $filename)␤»
> <masak> how come lines() defaults to $*IN, but slurp() doesn't?
> <moritz> not $*IN, $*ARGFILES
> <moritz> ... and I don't know
> <masak> they feel somehow analogous.
> <moritz> agreed
> * masak patches the spec
> <masak> oh, and S32/IO already has it that way. it's just that Rakudo
> doesn't implement it.
> * masak submits rakudo todo-ticket
> <moritz> masak: now spectesting a fix
> <masak> moritz++


--
Will "Coke" Coleda

Carl Mäsak via RT

unread,
May 21, 2013, 6:30:39 AM5/21/13
to perl6-c...@perl.org
On Tue May 21 00:22:55 2013, labster wrote:
> On Tue Nov 20 18:56:50 2012, coke wrote:
> > On Thu Apr 05 05:44:37 2012, masak wrote:
> > > <moritz> p6: say $*IN.slurp.comb(/e/).elems
> > > <p6eval> rakudo 4373f0, niecza v15-6-gefda208: OUTPUT«88␤»
> > > <masak> r: say slurp.comb(/e/).elems
> >
> > Both of these now say 88. Closable with tests.
> >
>
> Added tests to slurp.t (and moved it in the process) here:
> https://github.com/perl6/roast/commit/3fe5dba0f2

Excellent. Resolving.

0 new messages