Sha256: 89135d06410ad59dbbfb9d34d365628ab2bfa9e18a9c01c0c745b308ad2794e8

Contents?: true

Size: 662 Bytes

Versions: 37

Compression:

Stored size: 662 Bytes

Contents

module Regexp::Expression

  class Root < Regexp::Expression::Subexpression
    # TODO: this override is here for backwards compatibility, remove in 2.0.0
    def initialize(*args)
      unless args.first.is_a?(Regexp::Token)
        warn('WARNING: Root.new without a Token argument is deprecated and '\
             'will be removed in 2.0.0. Use Root.build for the old behavior.')
        return super(self.class.build_token, *args)
      end
      super
    end

    class << self
      def build(options = {})
        new(build_token, options)
      end

      def build_token
        Regexp::Token.new(:expression, :root, '', 0)
      end
    end
  end
end

Version data entries

37 entries across 32 versions & 6 rubygems

Version Path
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/regexp_parser-1.8.0/lib/regexp_parser/expression/classes/root.rb
plaid-14.12.1 vendor/bundle/ruby/3.0.0/gems/regexp_parser-1.8.0/lib/regexp_parser/expression/classes/root.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/lib/regexp_parser/expression/classes/root.rb
plaid-14.11.1 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/lib/regexp_parser/expression/classes/root.rb
plaid-14.10.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/lib/regexp_parser/expression/classes/root.rb
plaid-14.7.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.8.2/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/regexp_parser-1.8.2/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.8.2/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/regexp_parser-1.8.2/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.8.2/lib/regexp_parser/expression/classes/root.rb
regexp_parser-1.8.2 lib/regexp_parser/expression/classes/root.rb
regexp_parser-1.8.1 lib/regexp_parser/expression/classes/root.rb
regexp_parser-1.8.0 lib/regexp_parser/expression/classes/root.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.7.1/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.7.0/lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.7.1/lib/regexp_parser/expression/classes/root.rb
files.com-1.0.1 vendor/bundle/ruby/2.5.0/gems/regexp_parser-1.7.1/lib/regexp_parser/expression/classes/root.rb
regexp_parser-1.7.1 lib/regexp_parser/expression/classes/root.rb
tdiary-5.1.2 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.7.0/lib/regexp_parser/expression/classes/root.rb