summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorAdam Hess <[email protected]>2023-11-06 22:46:42 -0800
committerPeter Zhu <[email protected]>2023-11-08 08:05:58 -0500
commitf694bd158c4aaffbbb9e4b2f0608c6d428a4999c ()
tree70b19ea21ca94af9a889126a4166638390cc7b42 /test/ruby/test_regexp.rb
parent05cde4155cd43a79733ab4996db2d8b1f64c4fb5 (diff)
Improve error and memory handling
Apply Nobu's suggestions which improve style, memory handling and error correction. Co-authored-by: Nobuyoshi Nakada <[email protected]>
-rw-r--r--test/ruby/test_regexp.rb6
1 files changed, 6 insertions, 0 deletions
@@ -723,6 +723,12 @@ class TestRegexp < Test::Unit::TestCase
assert_raise(RegexpError) { Regexp.new("((?<v>))\\g<0>") }
end
def test_initialize_bool_warning
assert_warning(/expected true or false as ignorecase/) do
Regexp.new("foo", :i)