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

ruby-changes:48239

From: yui-knk <ko1@a...>
Date: Sun, 22 Oct 2017 16:04:05 +0900 (JST)
Subject: [ruby-changes:48239] yui-knk:r60354 (trunk): Fix a target method of a test

yui-knk	2017-10-22 16:04:00 +0900 (Sun, 22 Oct 2017)

  New Revision: 60354

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60354

  Log:
    Fix a target method of a test
    
    * test/ruby/test_string.rb (test_delete): I guess
      this line should be a test case which asserts
      coderange is handled correctly when a result of
      String#delete has non-ASCII characters.

  Modified files:
    trunk/test/ruby/test_string.rb
Index: test/ruby/test_string.rb
===================================================================
--- test/ruby/test_string.rb	(revision 60353)
+++ test/ruby/test_string.rb	(revision 60354)
@@ -673,7 +673,7 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L673
     assert_equal("a".hash, "a\u0101".delete("\u0101").hash, '[ruby-talk:329267]')
     assert_equal(true, "a\u0101".delete("\u0101").ascii_only?)
     assert_equal(true, "a\u3041".delete("\u3041").ascii_only?)
-    assert_equal(false, "a\u3041\u3042".tr("\u3041", "a").ascii_only?)
+    assert_equal(false, "a\u3041\u3042".delete("\u3041").ascii_only?)
 
     assert_equal("a", "abc\u{3042 3044 3046}".delete("^a"))
     assert_equal("bc\u{3042 3044 3046}", "abc\u{3042 3044 3046}".delete("a"))

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

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