mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
document named capture of MatchData#{offset,begin,end,inspect}.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
18d8fbac54
commit
7a7c26be73
2 changed files with 20 additions and 4 deletions
|
@ -57,7 +57,6 @@ class TestRegexp < Test::Unit::TestCase
|
|||
assert_equal(5, m.begin(:foo))
|
||||
assert_equal(8, m.end(:foo))
|
||||
assert_equal([5,8], m.offset(:foo))
|
||||
#assert_equal(["amp"], m.values_at(:foo))
|
||||
|
||||
assert_equal("aaa [amp] yyy", "aaa & yyy".sub(/&(?<foo>.*?);/, '[\k<foo>]'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue