[前][次][番号順一覧][スレッド一覧]

ruby-changes:4183

From: ko1@a...
Date: Mon, 3 Mar 2008 17:23:22 +0900 (JST)
Subject: [ruby-changes:4183] matz - Ruby:r15673 (trunk): * re.c (rb_reg_regsub): remove too strict encoding check.

matz	2008-03-03 17:22:18 +0900 (Mon, 03 Mar 2008)

  New Revision: 15673

  Modified files:
    trunk/ChangeLog
    trunk/re.c
    trunk/test/ruby/test_m17n_comb.rb

  Log:
    * re.c (rb_reg_regsub): remove too strict encoding check.
      [ruby-dev:33966]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n_comb.rb?r1=15673&r2=15672&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15673&r2=15672&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=15673&r2=15672&diff_format=u

Index: re.c
===================================================================
--- re.c	(revision 15672)
+++ re.c	(revision 15673)
@@ -2960,7 +2960,6 @@
     rb_encoding *str_enc = rb_enc_get(str);
     rb_encoding *src_enc = rb_enc_get(src);
 
-    rb_enc_check(str, src);
     p = s = RSTRING_PTR(str);
     e = s + RSTRING_LEN(str);
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15672)
+++ ChangeLog	(revision 15673)
@@ -1,3 +1,8 @@
+Mon Mar  3 17:15:09 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* re.c (rb_reg_regsub): remove too strict encoding check.
+	  [ruby-dev:33966]
+
 Mon Mar  3 16:14:24 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* hash.c (rb_any_hash): shrinks all results in Fixnum range.
Index: test/ruby/test_m17n_comb.rb
===================================================================
--- test/ruby/test_m17n_comb.rb	(revision 15672)
+++ test/ruby/test_m17n_comb.rb	(revision 15673)
@@ -1417,7 +1417,6 @@
           assert_equal(s1, doit.call)
           next
         end
-        assert(false, "test broken")
         if !str_enc_compatible?(s1.gsub(r2, ''), s3)
           assert_raise(ArgumentError, desc) { doit.call }
           next
@@ -1472,7 +1471,6 @@
           assert_equal([s1, nil], doit.call)
           next
         end
-        assert(false, "test broken")
         if !str_enc_compatible?(s1.gsub(r2, ''), s3)
           assert_raise(ArgumentError, desc) { doit.call }
           next

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]