Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #768 from kachick/implement-matchdata-string,regex…
…p,offset,captures Implement MatchData#{string,regexp,offset,captures}
- Loading branch information
Showing
with
33 additions
and 15 deletions.
- +1 −0 lib-topaz/bootstrap.rb
- +5 −0 lib-topaz/matchdata.rb
- +0 −1 spec/tags/core/matchdata/captures_tags.txt
- +0 −1 spec/tags/core/matchdata/offset_tags.txt
- +0 −2 spec/tags/core/matchdata/regexp_tags.txt
- +0 −2 spec/tags/core/matchdata/string_tags.txt
- +24 −6 topaz/objects/regexpobject.py
- +3 −3 topaz/objects/stringobject.py
@@ -0,0 +1,5 @@ | ||
class MatchData | ||
def offset(n) | ||
[self.begin(n), self.end(n)] | ||
end | ||
end |
@@ -1,3 +1,2 @@ | ||
fails:MatchData#offset returns a two element array with the begin and end of the nth match | ||
fails:MatchData#offset returns the offset for multi byte strings | ||
fails:MatchData#offset returns the offset for multi byte strings with unicode regexp |