diff --git a/ChangeLog b/ChangeLog index 858981af6a..ab47c6327a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 8 06:53:10 2011 Eric Hodel + + * 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 * configure.in (rpath): fix typo in the help string. a patch from diff --git a/doc/re.rdoc b/doc/re.rdoc index 0dfd8e5164..23eb37dfe2 100644 --- a/doc/re.rdoc +++ b/doc/re.rdoc @@ -533,8 +533,8 @@ performance. Consider a string of 25 as, a d, 4 as, and a c. - 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 @@ The following patterns match instantly as you would expect: 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 + and an enclosing * with nothing to