Sha256: d4b69917a8292f421e08bd0ab389633dbbe6830721097ec7a978c0a546920d80

Contents?: true

Size: 522 Bytes

Versions: 10

Compression:

Stored size: 522 Bytes

Contents

# re2 (https://github.com/mudge/re2)
# Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to
# backtracking regular expression engines like those used in PCRE, Perl, and
# Python".
#
# Copyright (c) 2010, Paul Mucur (https://mudge.name)
# Released under the BSD Licence, please see LICENSE.txt

module RE2
  class Scanner
    include Enumerable

    def each
      if block_given?
        while matches = scan
          yield matches
        end
      else
        to_enum(:each)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
re2-2.5.0 lib/re2/scanner.rb
re2-2.5.0-x86_64-linux lib/re2/scanner.rb
re2-2.5.0-x86_64-darwin lib/re2/scanner.rb
re2-2.5.0-x86-mingw32 lib/re2/scanner.rb
re2-2.5.0-x86-linux lib/re2/scanner.rb
re2-2.5.0-x64-mingw32 lib/re2/scanner.rb
re2-2.5.0-x64-mingw-ucrt lib/re2/scanner.rb
re2-2.5.0-arm64-darwin lib/re2/scanner.rb
re2-2.5.0-arm-linux lib/re2/scanner.rb
re2-2.5.0-aarch64-linux lib/re2/scanner.rb