mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 04:24:04 +02:00
parent
322dfc9acc
commit
76b52b42a3
2 changed files with 12 additions and 3 deletions
|
@ -1396,6 +1396,15 @@ class TestRegexp < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_invalid_group
|
||||
assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}")
|
||||
begin;
|
||||
assert_raise_with_message(RegexpError, /invalid conditional pattern/) do
|
||||
Regexp.new("((?(1)x|x|)x)+")
|
||||
end
|
||||
end;
|
||||
end
|
||||
|
||||
# This assertion is for porting x2() tests in testpy.py of Onigmo.
|
||||
def assert_match_at(re, str, positions, msg = nil)
|
||||
re = Regexp.new(re) unless re.is_a?(Regexp)
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||
#define RUBY_VERSION_TEENY 2
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL 20
|
||||
#define RUBY_PATCHLEVEL 21
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2022
|
||||
#define RUBY_RELEASE_MONTH 4
|
||||
#define RUBY_RELEASE_DAY 16
|
||||
#define RUBY_RELEASE_MONTH 5
|
||||
#define RUBY_RELEASE_DAY 1
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue