1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/syck/rubyext.c (syck_resolver_transfer): remove C++ style

comment (//).  [ruby-core:05793]

* lib/net/telnet.rb (Net::Telnet::waitfor): replace sysread with
  readpartial.  [ruby-talk:127641]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2005-09-16 03:09:51 +00:00
parent 8b02984629
commit 1b644555ae
6 changed files with 26 additions and 11 deletions

View file

@ -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> Fri Sep 16 00:17:03 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* test/logger/test_logger.rb: unintentionally overwritten changes by * 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. * 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> Wed Sep 14 23:28:28 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (collect_file_fd): rename from extract_file_fd. * win32/win32.c (collect_file_fd): rename from extract_file_fd.

View file

@ -1120,8 +1120,10 @@ syck_resolver_transfer( self, type, val )
} }
else if ( rb_cObject == target_class && subclass_v == Qnil ) 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; target_class = cYObject;
type = subclass; type = subclass;
subclass = cYObject; subclass = cYObject;

View file

@ -880,15 +880,17 @@ class CGI
cookies = Hash.new([]) cookies = Hash.new([])
return cookies unless raw_cookie return cookies unless raw_cookie
raw_cookie.split(/; /).each do |pairs| raw_cookie.split(/[;,] /).each do |pairs|
name, values = pairs.split('=',2) name, values = pairs.split('=',2)
next unless name and values next unless name and values
p [name, values]
name = CGI::unescape(name) name = CGI::unescape(name)
values ||= "" values ||= ""
values = values.split('&').collect{|v| CGI::unescape(v) } values = values.split('&').collect{|v| CGI::unescape(v) }
unless cookies.has_key?(name) if cookies.has_key?(name)
cookies[name] = Cookie::new({ "name" => name, "value" => values }) values = cookies[name].value + values
end end
cookies[name] = Cookie::new({ "name" => name, "value" => values })
end end
cookies cookies

View file

@ -554,7 +554,7 @@ module Net
raise TimeoutError, "timed out while waiting for more data" raise TimeoutError, "timed out while waiting for more data"
end end
begin begin
c = @sock.sysread(1024 * 1024) c = @sock.readpartial(1024 * 1024)
@dumplog.log_dump('<', c) if @options.has_key?("Dump_log") @dumplog.log_dump('<', c) if @options.has_key?("Dump_log")
if @options["Telnetmode"] if @options["Telnetmode"]
c = rest + c c = rest + c

View file

@ -149,7 +149,7 @@ sign_bits(int base, const char *p)
* *
* Flag | Applies to | Meaning * Flag | Applies to | Meaning
* ---------+--------------+----------------------------------------- * ---------+--------------+-----------------------------------------
* space | bdeEfgGioxXu | Leave a space at the start of * space | bdeEfgGiouxX | Leave a space at the start of
* | | positive numbers. * | | positive numbers.
* ---------+--------------+----------------------------------------- * ---------+--------------+-----------------------------------------
* (digit)$ | all | Specifies the absolute argument number * (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. * | | point to be added, even if no digits follow.
* | | For `g' and 'G', do not remove trailing zeros. * | | 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. * - | 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. * * | all | Use the next argument as the field width.
* | | If negative, left-justify the result. If the * | | If negative, left-justify the result. If the

View file

@ -11,15 +11,16 @@ class TestTCPSocket < Test::Unit::TestCase
svr = TCPServer.new("localhost", 0) svr = TCPServer.new("localhost", 0)
th = Thread.new { th = Thread.new {
c = svr.accept c = svr.accept
Thread.pass
ObjectSpace.each_object(String) {|s| ObjectSpace.each_object(String) {|s|
s.replace "a" if s.length == 0x10000 and !s.frozen? s.replace "a" if s.length == 0x10000 and !s.frozen?
} }
c.print("x"*0x1000) c.print("x"*0x10000)
} }
addr = svr.addr addr = svr.addr
sock = TCPSocket.open(addr[2], addr[1]) sock = TCPSocket.open(addr[2], addr[1])
assert_raise(RuntimeError, SocketError) { assert_raise(RuntimeError, SocketError) {
sock.recvfrom(0x10000) p sock.recvfrom(0x10000)
} }
ensure ensure
th.join th.join