diff --git a/lib/oga.rb b/lib/oga.rb index d9876cb..cf9a66c 100644 --- a/lib/oga.rb +++ b/lib/oga.rb @@ -1,4 +1,5 @@ require 'ast' +require 'set' require_relative 'oga/ast/node' diff --git a/lib/oga/xml/lexer.rl b/lib/oga/xml/lexer.rl index 6bca0eb..67311fb 100644 --- a/lib/oga/xml/lexer.rl +++ b/lib/oga/xml/lexer.rl @@ -21,9 +21,9 @@ module Oga # Names of the HTML void elements that should be handled when HTML lexing # is enabled. # - # @return [Array] + # @return [Set] # - HTML_VOID_ELEMENTS = [ + HTML_VOID_ELEMENTS = Set.new([ 'area', 'base', 'br', @@ -40,7 +40,7 @@ module Oga 'source', 'track', 'wbr' - ] + ]) # Lazy way of forwarding instance method calls used internally by Ragel # to their corresponding class methods.