ruby-changes:12381
From: yugui <ko1@a...>
Date: Mon, 13 Jul 2009 17:08:26 +0900 (JST)
Subject: [ruby-changes:12381] Ruby:r24080 (ruby_1_9_1): merges r24016 from trunk into ruby_1_9_1.
yugui 2009-07-13 17:08:14 +0900 (Mon, 13 Jul 2009) New Revision: 24080 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24080 Log: merges r24016 from trunk into ruby_1_9_1. -- Add test for marshaling regexp. Modified files: branches/ruby_1_9_1/test/ruby/marshaltestlib.rb branches/ruby_1_9_1/version.h Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 24079) +++ ruby_1_9_1/version.h (revision 24080) @@ -4,7 +4,7 @@ #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -#define RUBY_PATCHLEVEL 229 +#define RUBY_PATCHLEVEL 230 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 7 #define RUBY_RELEASE_DAY 12 Index: ruby_1_9_1/test/ruby/marshaltestlib.rb =================================================================== --- ruby_1_9_1/test/ruby/marshaltestlib.rb (revision 24079) +++ ruby_1_9_1/test/ruby/marshaltestlib.rb (revision 24080) @@ -1,3 +1,4 @@ +# coding: utf-8 module MarshalTestLib # include this module to a Test::Unit::TestCase and definde encode(o) and # decode(s) methods. e.g. @@ -245,6 +246,12 @@ marshal_equal(/a/) marshal_equal(/A/i) marshal_equal(/A/mx) + marshal_equal(/a\u3042/) + marshal_equal(/a) + assert_equal(Regexp.new(".force_encoding("ASCII-8BIT")), + Marshal.load("\004\b/\b\343\201\202\000")) + assert_equal(/au3042/, Marshal.load("\004\b/\fa\\u3042\000")) + #assert_equal(/au3042/u, Marshal.load("\004\b/\fa\\u3042@")) # spec end def test_regexp_subclass -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/