ruby-changes:16585
From: naruse <ko1@a...>
Date: Thu, 8 Jul 2010 17:18:21 +0900 (JST)
Subject: [ruby-changes:16585] Ruby:r28577 (trunk): * string.c (rb_str_conv_enc_opts): fix infinite loop because
naruse 2010-07-08 17:18:07 +0900 (Thu, 08 Jul 2010) New Revision: 28577 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28577 Log: * string.c (rb_str_conv_enc_opts): fix infinite loop because of ISO-2022-JP conversion with empty string. patched by Brian Buchanan [ruby-core:31107] Modified files: trunk/ChangeLog trunk/string.c Index: ChangeLog =================================================================== --- ChangeLog (revision 28576) +++ ChangeLog (revision 28577) @@ -1,3 +1,9 @@ +Thu Jul 8 15:47:34 2010 NARUSE, Yui <naruse@r...> + + * string.c (rb_str_conv_enc_opts): fix infinite loop because + of ISO-2022-JP conversion with empty string. + patched by Brian Buchanan [ruby-core:31107] + Thu Jul 8 08:16:57 2010 Aaron Patterson <aaron@t...> * ext/psych/lib/psych/visitors/yaml_tree.rb (push): adding version @@ -2,3 +8,3 @@ and header emit options. - + * test/psych/test_psych.rb: corresponding test. @@ -138,7 +144,7 @@ * ext/psych/lib/psych/scalar_scanner.rb(parse_time): add method for parsing times objects from a string. - + * test/psych/test_date_time.rb: tests for dumping DateTime objects. Sat Jul 3 09:13:55 2010 Aaron Patterson <aaron@t...> @@ -917,7 +923,7 @@ * ext/tk/stubs.c: dirty hack for frameworks and stubs on MacOS X. - * ext/tk/lib/tk.rb: stop creating a dummy Tcl/Tk interpreter. + * ext/tk/lib/tk.rb: stop creating a dummy Tcl/Tk interpreter. And hide a root window before starting eventloop. (for ruby 1.9) * ext/tk/tcltklib.c: add codes to support Ruby/Tk-Kit (Rubykit). Index: string.c =================================================================== --- string.c (revision 28576) +++ string.c (revision 28577) @@ -513,7 +513,7 @@ switch (ret) { case econv_destination_buffer_full: /* destination buffer short */ - len *= 2; + len = len < 2 ? 2 : len * 2; rb_str_resize(newstr, len); goto retry; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/