Project

General

Profile

Bug #7062

Rdoc for String#=~

Added by stomar (Marcus Stollsteimer) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
Backport:
[ruby-core:47668]

Description

=begin
This patch clarifies the different behaviour for str =~ regexp and regexp =~ str regarding captured strings and assigning to local variables. (See also issue #7042.)

Added text:

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.
=end


Files

rdoc_for_string_match.patch (592 Bytes) rdoc_for_string_match.patch stomar (Marcus Stollsteimer), 09/24/2012 04:46 AM

Associated revisions

Revision 1b5ce613
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 37109
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37109
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37109
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37109
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37109
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37109
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 5683d8b4
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 37111
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37111
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37111
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37111
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37111
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

Revision 37111
Added by zzak (Zachary Scott) almost 7 years ago

  • string.c (rb_str_match): Clarify behavior for captured strings and local variable assignment Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]

History

Updated by zzak (Zachary Scott) almost 7 years ago

  • Assignee changed from drbrain (Eric Hodel) to zzak (Zachary Scott)

Thank you stomar, I've discussed this with Eric and will be happy to commit it.

Updated by zzak (Zachary Scott) almost 7 years ago

  • Target version set to 2.0.0
#3

Updated by zzak (Zachary Scott) almost 7 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]

Also available in: Atom PDF