aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-05-07 04:19:24 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-05-07 04:19:24 +0900
commit1c70756e1afc11d3f50e9f735ef60119a7e9da5f (patch)
tree1facefa49e379e510fce0e7f314fe24533d4438b /activesupport/test
parent5c7656d9a568fda855e6e558b7e44b1ba51425be (diff)
downloadrails-1c70756e1afc11d3f50e9f735ef60119a7e9da5f.tar.gz
rails-1c70756e1afc11d3f50e9f735ef60119a7e9da5f.tar.bz2
rails-1c70756e1afc11d3f50e9f735ef60119a7e9da5f.zip
Remove `test_match_p` since Rails 6 requires Ruby 2.4.1 or newer
Follow up of #32034.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/regexp_ext_test.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/activesupport/test/core_ext/regexp_ext_test.rb b/activesupport/test/core_ext/regexp_ext_test.rb
index 5737bdafda..7d18297b64 100644
--- a/activesupport/test/core_ext/regexp_ext_test.rb
+++ b/activesupport/test/core_ext/regexp_ext_test.rb
@@ -9,28 +9,4 @@ class RegexpExtAccessTests < ActiveSupport::TestCase
assert_equal false, //.multiline?
assert_equal false, /(?m:)/.multiline?
end
-
- # Based on https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb.
- def test_match_p
- /back(...)/ =~ "backref"
- # must match here, but not in a separate method, e.g., assert_send,
- # to check if $~ is affected or not.
- assert_equal false, //.match?(nil)
- assert_equal true, //.match?("")
- assert_equal true, /.../.match?(:abc)
- assert_raise(TypeError) { /.../.match?(Object.new) }
- assert_equal true, /b/.match?("abc")
- assert_equal true, /b/.match?("abc", 1)
- assert_equal true, /../.match?("abc", 1)
- assert_equal true, /../.match?("abc", -2)
- assert_equal false, /../.match?("abc", -4)
- assert_equal false, /../.match?("abc", 4)
- assert_equal true, /\z/.match?("")
- assert_equal true, /\z/.match?("abc")
- assert_equal true, /R.../.match?("Ruby")
- assert_equal false, /R.../.match?("Ruby", 1)
- assert_equal false, /P.../.match?("Ruby")
- assert_equal "backref", $&
- assert_equal "ref", $1
- end
end