summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2022-02-19 18:45:49 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2022-02-19 18:45:49 +0900
commitdb6b23c76cbc7888cd9a9912790c2068703afdd0 (patch)
tree0730de840fbcacb2b2c24fb368b6647d69cefe70 /test
parent3200d97e95e5d84483b3df46dc54448a82820b9d (diff)
Find pattern is no longer experimental [Feature #18585]
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_pattern_matching.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index 35c41eb8b6..7531466f91 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1,8 +1,6 @@
# frozen_string_literal: true
require 'test/unit'
-experimental, Warning[:experimental] = Warning[:experimental], false # suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!"
-eval "\n#{<<~'END_of_GUARD'}", binding, __FILE__, __LINE__
class TestPatternMatching < Test::Unit::TestCase
class NullFormatter
def message_for(corrections)
@@ -1550,22 +1548,6 @@ END
assert_equal false, (1 in 2)
end
- def assert_experimental_warning(code)
- w = Warning[:experimental]
-
- Warning[:experimental] = false
- assert_warn('') {eval(code)}
-
- Warning[:experimental] = true
- assert_warn(/is experimental/) {eval(code)}
- ensure
- Warning[:experimental] = w
- end
-
- def test_experimental_warning
- assert_experimental_warning("case [0]; in [*, 0, *]; end")
- end
-
################################################################
def test_single_pattern_error_value_pattern
@@ -1693,5 +1675,3 @@ END
end
end
end
-END_of_GUARD
-Warning[:experimental] = experimental