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

Implement 0-arg slurp in Rakudo #2701

Closed
p6rt opened this issue Apr 5, 2012 · 6 comments
Closed

Implement 0-arg slurp in Rakudo #2701

p6rt opened this issue Apr 5, 2012 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 5, 2012

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

Searchable as RT112276$

@p6rt
Copy link
Author

p6rt commented Apr 5, 2012

From @masak

<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++

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

From @coke

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

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

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

@p6rt
Copy link
Author

p6rt commented May 21, 2013

From @labster

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​:
Raku/roast@3fe5dba0f2

@p6rt
Copy link
Author

p6rt commented May 21, 2013

From @masak

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​:
Raku/roast@3fe5dba0f2

Excellent. Resolving.

@p6rt
Copy link
Author

p6rt commented May 21, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant