Sha256: 7f024d54a6577bb2be8c3a0c2fed0ed55d86c4fbaeb7e7040ba1e7dffc0a00b9

Contents?: true

Size: 554 Bytes

Versions: 69

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

# 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

69 entries across 69 versions & 1 rubygems

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