ruby-changes:12355
From: yugui <ko1@a...>
Date: Sun, 12 Jul 2009 23:46:14 +0900 (JST)
Subject: [ruby-changes:12355] Ruby:r24050 (ruby_1_9_1): merges r23918 and r23919 from trunk into ruby_1_9_1.
yugui 2009-07-12 23:45:57 +0900 (Sun, 12 Jul 2009) New Revision: 24050 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24050 Log: merges r23918 and r23919 from trunk into ruby_1_9_1. -- * marshal.c (w_encoding): encodings need extra depth. [ruby-core:24100] -- * test/ruby/test_marshal.rb (TestMarshal#test_limit): test for [ruby-core:24100]. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/marshal.c branches/ruby_1_9_1/test/ruby/test_marshal.rb branches/ruby_1_9_1/version.h Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 24049) +++ ruby_1_9_1/ChangeLog (revision 24050) @@ -1,3 +1,8 @@ +Wed Jul 1 08:46:11 2009 Nobuyoshi Nakada <nobu@r...> + + * marshal.c (w_encoding): encodings need extra depth. + [ruby-core:24100] + Tue Jun 30 17:44:24 2009 Yukihiro Matsumoto <matz@r...> * re.c (reg_match_pos): adjust offset based on characters, not Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 24049) +++ ruby_1_9_1/version.h (revision 24050) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-07-12" -#define RUBY_PATCHLEVEL 213 +#define RUBY_PATCHLEVEL 214 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_1/marshal.c =================================================================== --- ruby_1_9_1/marshal.c (revision 24049) +++ ruby_1_9_1/marshal.c (revision 24050) @@ -496,7 +496,7 @@ name = (st_data_t)rb_str_new2(rb_enc_name(enc)); st_insert(arg->arg->encodings, (st_data_t)rb_enc_name(enc), name); } while (0); - w_object(name, arg->arg, arg->limit); + w_object(name, arg->arg, arg->limit + 1); } static void Index: ruby_1_9_1/test/ruby/test_marshal.rb =================================================================== --- ruby_1_9_1/test/ruby/test_marshal.rb (revision 24049) +++ ruby_1_9_1/test/ruby/test_marshal.rb (revision 24050) @@ -116,6 +116,7 @@ def test_limit assert_equal([[[]]], Marshal.load(Marshal.dump([[[]]], 3))) assert_raise(ArgumentError) { Marshal.dump([[[]]], 2) } + assert_nothing_raised(ArgumentError, '[ruby-core:24100]') { Marshal.dump("\u3042", 1) } end def test_userdef_invalid -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/