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

ruby-changes:40977

From: yui-knk <ko1@a...>
Date: Sat, 12 Dec 2015 18:29:47 +0900 (JST)
Subject: [ruby-changes:40977] yui-knk:r53056 (trunk): * test/ruby/test_regexp.rb: Add test cases for `$KCODE` and `$=` warning

yui-knk	2015-12-12 18:29:35 +0900 (Sat, 12 Dec 2015)

  New Revision: 53056

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

  Log:
    * test/ruby/test_regexp.rb: Add test cases for `$KCODE` and `$=` warning
      [Misc #11770][ruby-dev:49398]

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_regexp.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53055)
+++ ChangeLog	(revision 53056)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 12 17:59:07 2015  Yuichiro Kaneko  <yui-knk@r...>
+
+	* test/ruby/test_regexp.rb: Add test cases for `$KCODE` and `$=` warning
+	  [Misc #11770][ruby-dev:49398]
+
 Sat Dec 12 17:11:57 2015  CHIKANAGA Tomoyuki  <nagachika@r...>
 
 	* doc/NEWS-0.2.2: add description about incompatible change in Hash
Index: test/ruby/test_regexp.rb
===================================================================
--- test/ruby/test_regexp.rb	(revision 53055)
+++ test/ruby/test_regexp.rb	(revision 53056)
@@ -537,6 +537,16 @@ class TestRegexp < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb#L537
     assert_nothing_raised { $= = nil }
   end
 
+  def test_KCODE_warning
+    assert_warning(/variable \$KCODE is no longer effective; ignored/) { $KCODE = nil }
+    assert_warning(/variable \$KCODE is no longer effective/) { $KCODE = nil }
+  end
+
+  def test_ignorecase_warning
+    assert_warning(/variable \$= is no longer effective; ignored/) { $= = nil }
+    assert_warning(/variable \$= is no longer effective/) { $= }
+  end
+
   def test_match_setter
     /foo/ =~ "foo"
     m = $~

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

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