summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index a3fdd59738..8e01c05597 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -537,6 +537,16 @@ class TestRegexp < Test::Unit::TestCase
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 = $~