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

ruby-changes:3703

From: ko1@a...
Date: Thu, 24 Jan 2008 00:35:05 +0900 (JST)
Subject: [ruby-changes:3703] akr - Ruby:r15192 (trunk): fix previous change.

akr	2008-01-24 00:34:31 +0900 (Thu, 24 Jan 2008)

  New Revision: 15192

  Modified files:
    trunk/test/ruby/test_m17n_comb.rb

  Log:
    fix previous change.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n_comb.rb?r1=15192&r2=15191&diff_format=u

Index: test/ruby/test_m17n_comb.rb
===================================================================
--- test/ruby/test_m17n_comb.rb	(revision 15191)
+++ test/ruby/test_m17n_comb.rb	(revision 15192)
@@ -984,8 +984,9 @@
         pos2 = pos
         pos2 += s1.length if pos < 0
         re = /\A(.{0,#{pos2}})#{Regexp.escape(s2)}/m
-        assert(enccall(re, :match, s1), "#{re.inspect}.match(#{encdump(s1)})")
-        assert_equal($1.length, t, "#{encdump s1}.rindex(#{encdump s2}, #{pos})")
+        m = enccall(re, :match, s1)
+        assert(m, "#{re.inspect}.match(#{encdump(s1)})")
+        assert_equal(m[1].length, t, "#{encdump s1}.rindex(#{encdump s2}, #{pos})")
       else
         re = /#{Regexp.escape(s2)}/
         n = re =~ s1

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

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