Skip to content

Commit

Permalink
s/spew/spurt/g for compatibility with latest spec
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jun 24, 2012
1 parent f91bc64 commit 95a1946
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/nam.pod
Expand Up @@ -606,7 +606,7 @@ Adds the contents of a fixed list to the beginning of a variable list in order.

=head3 slurp

=head3 spew
=head3 spurt

=head3 treader_getc

Expand Down
4 changes: 2 additions & 2 deletions examples/notepad.pl
Expand Up @@ -78,7 +78,7 @@ ($sender, $eventargs)

sub Save($sender, $eventargs) #OK not used
{
if defined $filename { spew $filename, $textbox.Text; $modified=False; setformtitle(); }
if defined $filename { spurt $filename, $textbox.Text; $modified=False; setformtitle(); }
else { SaveAs($sender, $eventargs); }
}

Expand All @@ -89,7 +89,7 @@ ($sender, $eventargs)
$dialogSave.FilterIndex = 1;
if ~ $dialogSave.ShowDialog eq 'OK' {
$filename = $dialogSave.FileName;
spew $filename, $textbox.Text;
spurt $filename, $textbox.Text;
$modified = False;
setformtitle();
}
Expand Down
4 changes: 2 additions & 2 deletions lib/CORE.setting
Expand Up @@ -3551,7 +3551,7 @@ sub unbase(Int:D $base, Cool:D $str) is pure {
# I/O stuff {{{
sub slurp($path) is unsafe { Q:CgOp { (box Str (slurp (unbox str (@ {$path})))) } }
sub spew($path,$text) is unsafe { Q:CgOp { (rnull (spew (unbox str (@ {$path.Str})) (unbox str (@ {$text.Str})))) } }
sub spurt($path,$text) is unsafe { Q:CgOp { (rnull (spurt (unbox str (@ {$path.Str})) (unbox str (@ {$text.Str})))) } }
sub dir($directory = '.', Mu :$test = none('.','..')) is unsafe {
grep $test, Q:CgOp { (dir (obj_getstr {$directory})) };
Expand Down Expand Up @@ -3583,7 +3583,7 @@ my class IO {
method IO() { self }
method slurp() { slurp $.path }
method spew($text) { spew $.path, $text }
method spurt($text) { spurt $.path, $text }
method combine(*@paths) {
die "Sorry, paths do not form a monoid." unless @paths;
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen.cs
Expand Up @@ -3081,7 +3081,7 @@ class NamProcessor {
thandlers["say"] = Methody(null, Tokens.Console_WriteLine);
thandlers["print"] = Methody(null, Tokens.Console_Write);
thandlers["slurp"] = Methody(null, typeof(File).GetMethod("ReadAllText", new Type[] { Tokens.String }));
thandlers["spew"] = Methody(null, typeof(File).GetMethod("WriteAllText", new Type[] { Tokens.String, Tokens.String }));
thandlers["spurt"] = Methody(null, typeof(File).GetMethod("WriteAllText", new Type[] { Tokens.String, Tokens.String }));
thandlers["vvarlist_to_fvarlist"] = Methody(null, Tokens.VVarList.GetMethod("CopyAsArray"));
thandlers["vvarlist_shift"] = Methody(null, Tokens.VVarList.GetMethod("Shift"));
thandlers["vvarlist_pop"] = Methody(null, Tokens.VVarList.GetMethod("Pop"));
Expand Down
2 changes: 1 addition & 1 deletion src/CgOp.pm6
Expand Up @@ -54,7 +54,7 @@ CgOp._register_ops: <
rxincquant rxinit rxopenquant rxpushb rxpushcapture rxsetcapsfrom
rxsetclass rxsetpos rxsetquant rxstripcaps say scopedlex setbox
setfield setindex setslot set_status sig_slurp_capture sink slurp
span specificlex spew stab_privatemethod stab_what startgather
span specificlex spurt stab_privatemethod stab_what startgather
start_iter statement status_get str strbuf_append strbuf_new strbuf_seal
str_chr strcmp str_flip str_length str_substring str_tolower
str_tonum str_toupper take ternary to_json to_jsync treader_getc
Expand Down

0 comments on commit 95a1946

Please sign in to comment.