ruby-changes:21927
From: drbrain <ko1@a...>
Date: Thu, 8 Dec 2011 08:03:08 +0900 (JST)
Subject: [ruby-changes:21927] drbrain:r33976 (trunk): * doc/re.rdoc: Fix example code to match documentation. Patch by
drbrain 2011-12-08 08:02:58 +0900 (Thu, 08 Dec 2011) New Revision: 33976 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33976 Log: * doc/re.rdoc: Fix example code to match documentation. Patch by Jarno Lamberg. [Ruby 1.9 - Bug #5624] Modified files: trunk/ChangeLog trunk/doc/re.rdoc Index: doc/re.rdoc =================================================================== --- doc/re.rdoc (revision 33975) +++ doc/re.rdoc (revision 33976) @@ -533,8 +533,8 @@ Consider a string of 25 <i>a</i>s, a <i>d</i>, 4 <i>a</i>s, and a <i>c</i>. - s = 'a' * 25 + 'd' 'a' * 4 + 'c' - #=> "aaaaaaaaaaaaaaaaaaaaaaaaadadadadac" + s = 'a' * 25 + 'd' + 'a' * 4 + 'c' + #=> "aaaaaaaaaaaaaaaaaaaaaaaaadaaaac" The following patterns match instantly as you would expect: @@ -544,7 +544,7 @@ However, the following pattern takes appreciably longer: - /(b|a+)*c/ =~ s #=> 32 + /(b|a+)*c/ =~ s #=> 26 This happens because an atom in the regexp is quantified by both an immediate <tt>+</tt> and an enclosing <tt>*</tt> with nothing to Index: ChangeLog =================================================================== --- ChangeLog (revision 33975) +++ ChangeLog (revision 33976) @@ -1,3 +1,8 @@ +Thu Dec 8 06:53:10 2011 Eric Hodel <drbrain@s...> + + * doc/re.rdoc: Fix example code to match documentation. Patch by + Jarno Lamberg. [Ruby 1.9 - Bug #5624] + Wed Dec 7 19:04:22 2011 Nobuyoshi Nakada <nobu@r...> * configure.in (rpath): fix typo in the help string. a patch from -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/