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

ruby-changes:13697

From: yugui <ko1@a...>
Date: Sun, 25 Oct 2009 23:47:37 +0900 (JST)
Subject: [ruby-changes:13697] Ruby:r25484 (ruby_1_9_1): merges r24546 from trunk into ruby_1_9_1.

yugui	2009-10-25 23:47:06 +0900 (Sun, 25 Oct 2009)

  New Revision: 25484

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25484

  Log:
    merges r24546 from trunk into ruby_1_9_1.
    --
    * regparse.c (add_ctype_to_cc_by_range): fix the first
      character bigger than sb_out was dropped.
    
    * test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket):
      add tests for above.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/regparse.c
    branches/ruby_1_9_1/test/ruby/test_regexp.rb
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/regparse.c
===================================================================
--- ruby_1_9_1/regparse.c	(revision 25483)
+++ ruby_1_9_1/regparse.c	(revision 25484)
@@ -3768,8 +3768,7 @@
       for (j  = ONIGENC_CODE_RANGE_FROM(mbr, i);
            j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) {
 	if (j >= sb_out) {
-	  if (j == ONIGENC_CODE_RANGE_TO(mbr, i)) i++;
-	  else if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) {
+	  if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) {
 	    r = add_code_range_to_buf(&(cc->mbuf), j,
 				      ONIGENC_CODE_RANGE_TO(mbr, i));
 	    if (r != 0) return r;
Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 25483)
+++ ruby_1_9_1/ChangeLog	(revision 25484)
@@ -1,3 +1,11 @@
+Sun Aug 16 01:10:00 2009  NARUSE, Yui  <naruse@r...>
+
+	* regparse.c (add_ctype_to_cc_by_range): fix the first
+	  character bigger than sb_out was dropped.
+
+	* test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket):
+	  add tests for above.
+
 Fri Aug 14 14:31:33 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (rubyhdrdir): fixed typo.  [ruby-dev:39079]
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 25483)
+++ ruby_1_9_1/version.h	(revision 25484)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 290
+#define RUBY_PATCHLEVEL 291
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_1/test/ruby/test_regexp.rb
===================================================================
--- ruby_1_9_1/test/ruby/test_regexp.rb	(revision 25483)
+++ ruby_1_9_1/test/ruby/test_regexp.rb	(revision 25484)
@@ -671,6 +671,12 @@
     failcheck('[[:alpha')
     failcheck('[[:alpha:')
     failcheck('[[:alp:]]')
+
+    assert_match(/\A[[:digit:]]+\z/, "\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19")
+    assert_match(/\A[[:alnum:]]+\z/, "\uff10\uff19\uff41\uff5a\uff21\uff3a")
+    assert_match(/\A[[:space:]]+\z/, "\r\n\v\f\r\s\u0085")
+    assert_match(/\A[[:ascii:]]+\z/, "\x00\x7F")
+    assert_no_match(/[[:ascii:]]/, "\x80\xFF")
   end
 
   def test_backward

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

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