Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[IO/Socket/INET.pm] rewrite the socket() method to avoid using := and…
… re-enable the relevant line in spectest.data
  • Loading branch information
Martin Berends committed Jun 14, 2010
1 parent 7d80cd4 commit 8b0022b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/core/IO/Socket/INET.pm
Expand Up @@ -41,9 +41,18 @@ class IO::Socket::INET is Cool does IO::Socket {
}

method socket(Int $domain, Int $type, Int $protocol) {
my $PIO := Q:PIR {{ %r = root_new ['parrot';'Socket'] }};
$PIO.socket($domain, $type, $protocol);
return IO::Socket::INET.new( :PIO($PIO) );
return IO::Socket::INET.new( :PIO(Q:PIR {{
.local pmc pio
.local pmc domain
.local pmc type
.local pmc protocol
pio = root_new ['parrot';'Socket']
domain = find_lex "$domain"
type = find_lex "$type"
protocol = find_lex "$protocol"
pio.'socket'(domain, type, protocol)
%r = pio
}}) );
}
method bind($host, $port) {
Expand Down
2 changes: 1 addition & 1 deletion t/spectest.data
Expand Up @@ -509,7 +509,7 @@ S32-hash/push.t
# S32-io/chdir.t
S32-io/file-tests.t
S32-io/note.t
# S32-io/IO-Socket-INET.t
S32-io/IO-Socket-INET.t
S32-list/classify.t
## S32-list/create.t
S32-list/end.t
Expand Down

0 comments on commit 8b0022b

Please sign in to comment.