1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* doc/re.rdoc (Performance): Removed useless sample output from final

performance example and switched from #match to #=~ for consistency.
  [ruby-trunk - Bug #6524]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-06-01 21:35:05 +00:00
parent 5b95238aa7
commit 8424e37992
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Sat Jun 2 06:34:15 2012 Eric Hodel <drbrain@segment7.net>
* doc/re.rdoc (Performance): Removed useless sample output from final
performance example and switched from #match to #=~ for consistency.
[ruby-trunk - Bug #6524]
Fri Jun 1 09:30:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> Fri Jun 1 09:30:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* object.c (class_or_module_required): extract check for class or * object.c (class_or_module_required): extract check for class or

View file

@ -644,6 +644,5 @@ One approach for improving performance is to anchor the match to the
beginning of the string, thus significantly reducing the amount of beginning of the string, thus significantly reducing the amount of
backtracking needed. backtracking needed.
Regexp.new('\A' 'a?' * 29 + 'a' * 29).match('a' * 29) Regexp.new('\A' 'a?' * 29 + 'a' * 29) =~ 'a' * 29
#=> #<MatchData "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa">