Rdoc for String#=~
This patch clarifies the different behaviour for str =~ regexp and regexp =~ str regarding captured strings and assigning to local variables. (See also issue #7042.)
Note: str =~ regexp is not the same as
regexp =~ str. Strings captured from named capture groups
are not assigned to local variables in the first case.
Updated by zzak (Zachary Scott) about 8 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r37109.
Marcus, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]