[macruby-changes] [5204] MacRuby/trunk/lib/strscan.rb

source_changes at macosforge.org source_changes at macosforge.org
Thu Jan 27 23:25:10 PST 2011


Revision: 5204
          http://trac.macosforge.org/projects/ruby/changeset/5204
Author:   mattaimonetti at gmail.com
Date:     2011-01-27 23:25:09 -0800 (Thu, 27 Jan 2011)
Log Message:
-----------
fixed #668 - stringscanner scan was using ^ instead of \A

Modified Paths:
--------------
    MacRuby/trunk/lib/strscan.rb

Modified: MacRuby/trunk/lib/strscan.rb
===================================================================
--- MacRuby/trunk/lib/strscan.rb	2011-01-28 06:03:17 UTC (rev 5203)
+++ MacRuby/trunk/lib/strscan.rb	2011-01-28 07:25:09 UTC (rev 5204)
@@ -623,7 +623,7 @@
     return nil if rest_size < 0
 
     if headonly
-      headonly_pattern = Regexp.new('^' + pattern.source, pattern.options)
+      headonly_pattern = Regexp.new('\A' + pattern.source, pattern.options)
       @match = headonly_pattern.match rest
     else
       @match = pattern.match rest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110127/7c989a02/attachment.html>


More information about the macruby-changes mailing list