aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--ext/syck/rubyext.c6
-rw-r--r--lib/cgi.rb8
-rw-r--r--lib/net/telnet.rb2
-rw-r--r--sprintf.c6
-rw-r--r--test/socket/test_tcp.rb5
6 files changed, 26 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 494b100706..6e8445871c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 16 12:02:12 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * ext/syck/rubyext.c (syck_resolver_transfer): remove C++ style
+ comment (//). [ruby-core:05793]
+
Fri Sep 16 00:17:03 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* test/logger/test_logger.rb: unintentionally overwritten changes by
@@ -115,6 +120,11 @@ Thu Sep 15 11:01:58 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_select): check consoles by polling them.
+Thu Sep 15 00:18:24 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/net/telnet.rb (Net::Telnet::waitfor): replace sysread with
+ readpartial. [ruby-talk:127641]
+
Wed Sep 14 23:28:28 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (collect_file_fd): rename from extract_file_fd.
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 27e7adaa54..878f326803 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -1120,8 +1120,10 @@ syck_resolver_transfer( self, type, val )
}
else if ( rb_cObject == target_class && subclass_v == Qnil )
{
- // StringValue(subclass);
- // printf( "No class: %s\n", RSTRING(subclass)->ptr );
+ /*
+ StringValue(subclass);
+ printf( "No class: %s\n", RSTRING(subclass)->ptr );
+ */
target_class = cYObject;
type = subclass;
subclass = cYObject;
diff --git a/lib/cgi.rb b/lib/cgi.rb
index bcc3dd9001..fc16ead671 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -880,15 +880,17 @@ class CGI
cookies = Hash.new([])
return cookies unless raw_cookie
- raw_cookie.split(/; /).each do |pairs|
+ raw_cookie.split(/[;,] /).each do |pairs|
name, values = pairs.split('=',2)
next unless name and values
+ p [name, values]
name = CGI::unescape(name)
values ||= ""
values = values.split('&').collect{|v| CGI::unescape(v) }
- unless cookies.has_key?(name)
- cookies[name] = Cookie::new({ "name" => name, "value" => values })
+ if cookies.has_key?(name)
+ values = cookies[name].value + values
end
+ cookies[name] = Cookie::new({ "name" => name, "value" => values })
end
cookies
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb
index 1ac5f25f09..16459d7c65 100644
--- a/lib/net/telnet.rb
+++ b/lib/net/telnet.rb
@@ -554,7 +554,7 @@ module Net
raise TimeoutError, "timed out while waiting for more data"
end
begin
- c = @sock.sysread(1024 * 1024)
+ c = @sock.readpartial(1024 * 1024)
@dumplog.log_dump('<', c) if @options.has_key?("Dump_log")
if @options["Telnetmode"]
c = rest + c
diff --git a/sprintf.c b/sprintf.c
index 1633717cbe..c4419259f3 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -149,7 +149,7 @@ sign_bits(int base, const char *p)
*
* Flag | Applies to | Meaning
* ---------+--------------+-----------------------------------------
- * space | bdeEfgGioxXu | Leave a space at the start of
+ * space | bdeEfgGiouxX | Leave a space at the start of
* | | positive numbers.
* ---------+--------------+-----------------------------------------
* (digit)$ | all | Specifies the absolute argument number
@@ -165,11 +165,11 @@ sign_bits(int base, const char *p)
* | | point to be added, even if no digits follow.
* | | For `g' and 'G', do not remove trailing zeros.
* ---------+--------------+-----------------------------------------
- * + | bdeEfgGioxXu | Add a leading plus sign to positive numbers.
+ * + | bdeEfgGiouxX | Add a leading plus sign to positive numbers.
* ---------+--------------+-----------------------------------------
* - | all | Left-justify the result of this conversion.
* ---------+--------------+-----------------------------------------
- * 0 (zero) | all | Pad with zeros, not spaces.
+ * 0 (zero) | bdeEfgGiouxX | Pad with zeros, not spaces.
* ---------+--------------+-----------------------------------------
* * | all | Use the next argument as the field width.
* | | If negative, left-justify the result. If the
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index 596919082f..9e6623bdfc 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -11,15 +11,16 @@ class TestTCPSocket < Test::Unit::TestCase
svr = TCPServer.new("localhost", 0)
th = Thread.new {
c = svr.accept
+ Thread.pass
ObjectSpace.each_object(String) {|s|
s.replace "a" if s.length == 0x10000 and !s.frozen?
}
- c.print("x"*0x1000)
+ c.print("x"*0x10000)
}
addr = svr.addr
sock = TCPSocket.open(addr[2], addr[1])
assert_raise(RuntimeError, SocketError) {
- sock.recvfrom(0x10000)
+ p sock.recvfrom(0x10000)
}
ensure
th.join