-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Enhanced RDoc for MatchData #5822
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, a few minor changes requested.
re.c
Outdated
* #=> #<MatchData "o"> | ||
* /(.)(.)(.)/.match("foo") | ||
* # => #<MatchData "foo" 1:"f" 2:"o" 3:"o"> | ||
* m.inspect # => "#<MatchData \"o\">" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line and other m.inspect
lines below look wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. There is one example block that should be deleted, after that this can be merged without additional review.
re.c
Outdated
* | ||
* puts /(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").inspect | ||
* #=> #<MatchData "hog" foo:"h" bar:"o" baz:"g"> | ||
* m = /(?<foo>.)(?<bar>.)(?<baz>.)/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example block shows Regexp#inspect
, not MatchData#inspect
, so I think it should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Treats:
Also some very minor housekeeping.