summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-23 01:27:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-23 01:27:31 +0000
commite12e30710f91c422a0bee189e41c405399186d82 (patch)
tree7c8af54830de664e2e4a2b9a7d14f1e919ed1350 /ext
parentabf36b65d083331c8460c6790eaf86b398b1cc05 (diff)
* ext/socket/socket.c: fix errors in socket sample code.
[ruby-core:09992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 57eb7a4..2490453 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -2951,7 +2951,7 @@ sock_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock)
* socket.bind( sockaddr )
* socket.listen( 5 )
* client, client_sockaddr = socket.accept
- * puts "The client said, '#{socket.readline.chomp}'"
+ * puts "The client said, '#{client.readline.chomp}'"
* client.puts "Hello from script one!"
* socket.close
*
@@ -3056,7 +3056,7 @@ sock_accept(sock)
* IO.select([socket])
* retry
* end
- * puts "The client said, '#{socket.readline.chomp}'"
+ * puts "The client said, '#{client_socket.readline.chomp}'"
* client_socket.puts "Hello from script one!"
* socket.close
*
@@ -3111,8 +3111,8 @@ sock_accept_nonblock(sock)
* socket.bind( sockaddr )
* socket.listen( 5 )
* client_fd, client_sockaddr = socket.sysaccept
- * puts "The client said, '#{socket.readline.chomp}'"
* client_socket = Socket.for_fd( client_fd )
+ * puts "The client said, '#{client_socket.readline.chomp}'"
* client_socket.puts "Hello from script one!"
* socket.close
*