diff options
Diffstat (limited to 'lib/rexml')
50 files changed, 50 insertions, 0 deletions
diff --git a/lib/rexml/attlistdecl.rb b/lib/rexml/attlistdecl.rb index e2135d9e83..dc1d2add0b 100644 --- a/lib/rexml/attlistdecl.rb +++ b/lib/rexml/attlistdecl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false #vim:ts=2 sw=2 noexpandtab: require 'rexml/child' require 'rexml/source' diff --git a/lib/rexml/attribute.rb b/lib/rexml/attribute.rb index ef9e544294..e9917cf52d 100644 --- a/lib/rexml/attribute.rb +++ b/lib/rexml/attribute.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/namespace" require 'rexml/text' diff --git a/lib/rexml/cdata.rb b/lib/rexml/cdata.rb index 73358edc28..fe9b49b5f7 100644 --- a/lib/rexml/cdata.rb +++ b/lib/rexml/cdata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/text" module REXML diff --git a/lib/rexml/child.rb b/lib/rexml/child.rb index bf97d5f903..d23451e71e 100644 --- a/lib/rexml/child.rb +++ b/lib/rexml/child.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/node" module REXML diff --git a/lib/rexml/comment.rb b/lib/rexml/comment.rb index 000b03dddd..746af77296 100644 --- a/lib/rexml/comment.rb +++ b/lib/rexml/comment.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" module REXML diff --git a/lib/rexml/doctype.rb b/lib/rexml/doctype.rb index 0b3c533bb4..1eb1f5b4e1 100644 --- a/lib/rexml/doctype.rb +++ b/lib/rexml/doctype.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/parent" require "rexml/parseexception" require "rexml/namespace" diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index d7d24f4732..806bc499cd 100644 --- a/lib/rexml/document.rb +++ b/lib/rexml/document.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/security" require "rexml/element" require "rexml/xmldecl" diff --git a/lib/rexml/dtd/attlistdecl.rb b/lib/rexml/dtd/attlistdecl.rb index 25955ee274..32847daadb 100644 --- a/lib/rexml/dtd/attlistdecl.rb +++ b/lib/rexml/dtd/attlistdecl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" module REXML module DTD diff --git a/lib/rexml/dtd/dtd.rb b/lib/rexml/dtd/dtd.rb index 62317bac9e..927d5d847b 100644 --- a/lib/rexml/dtd/dtd.rb +++ b/lib/rexml/dtd/dtd.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/dtd/elementdecl" require "rexml/dtd/entitydecl" require "rexml/comment" diff --git a/lib/rexml/dtd/elementdecl.rb b/lib/rexml/dtd/elementdecl.rb index f90b27d761..119fd41a8f 100644 --- a/lib/rexml/dtd/elementdecl.rb +++ b/lib/rexml/dtd/elementdecl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" module REXML module DTD diff --git a/lib/rexml/dtd/entitydecl.rb b/lib/rexml/dtd/entitydecl.rb index a9286b2b90..45707e2f42 100644 --- a/lib/rexml/dtd/entitydecl.rb +++ b/lib/rexml/dtd/entitydecl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" module REXML module DTD diff --git a/lib/rexml/dtd/notationdecl.rb b/lib/rexml/dtd/notationdecl.rb index 17d1b9ef29..cfdf0b9b74 100644 --- a/lib/rexml/dtd/notationdecl.rb +++ b/lib/rexml/dtd/notationdecl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" module REXML module DTD diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index e459704d3c..f725d5a2be 100644 --- a/lib/rexml/element.rb +++ b/lib/rexml/element.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/parent" require "rexml/namespace" require "rexml/attribute" diff --git a/lib/rexml/encoding.rb b/lib/rexml/encoding.rb index 1c7e79a124..da2d70d6c9 100644 --- a/lib/rexml/encoding.rb +++ b/lib/rexml/encoding.rb @@ -1,4 +1,5 @@ # coding: US-ASCII +# frozen_string_literal: false module REXML module Encoding # ID ---> Encoding name diff --git a/lib/rexml/entity.rb b/lib/rexml/entity.rb index 3a35ec6b94..d9a72cc8fa 100644 --- a/lib/rexml/entity.rb +++ b/lib/rexml/entity.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/child' require 'rexml/source' require 'rexml/xmltokens' diff --git a/lib/rexml/formatters/default.rb b/lib/rexml/formatters/default.rb index 574c821f96..b84759d2ff 100644 --- a/lib/rexml/formatters/default.rb +++ b/lib/rexml/formatters/default.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML module Formatters class Default diff --git a/lib/rexml/formatters/pretty.rb b/lib/rexml/formatters/pretty.rb index e5ba561a58..a80274bdad 100644 --- a/lib/rexml/formatters/pretty.rb +++ b/lib/rexml/formatters/pretty.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/formatters/default' module REXML diff --git a/lib/rexml/formatters/transitive.rb b/lib/rexml/formatters/transitive.rb index 6cc690d922..81e67f3274 100644 --- a/lib/rexml/formatters/transitive.rb +++ b/lib/rexml/formatters/transitive.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/formatters/pretty' module REXML diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb index 2010be14e0..ee73b28881 100644 --- a/lib/rexml/functions.rb +++ b/lib/rexml/functions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML # If you add a method, keep in mind two things: # (1) the first argument will always be a list of nodes from which to diff --git a/lib/rexml/instruction.rb b/lib/rexml/instruction.rb index f8b734a5b5..576939ca2b 100644 --- a/lib/rexml/instruction.rb +++ b/lib/rexml/instruction.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" require "rexml/source" diff --git a/lib/rexml/light/node.rb b/lib/rexml/light/node.rb index b33f78f7ce..d58119a3a4 100644 --- a/lib/rexml/light/node.rb +++ b/lib/rexml/light/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/xmltokens' # [ :element, parent, name, attributes, children* ] diff --git a/lib/rexml/namespace.rb b/lib/rexml/namespace.rb index aeb339ee83..90ba7cc635 100644 --- a/lib/rexml/namespace.rb +++ b/lib/rexml/namespace.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/xmltokens' module REXML diff --git a/lib/rexml/node.rb b/lib/rexml/node.rb index cab6e9fddb..c7a3936799 100644 --- a/lib/rexml/node.rb +++ b/lib/rexml/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/parseexception" require "rexml/formatters/pretty" require "rexml/formatters/default" diff --git a/lib/rexml/output.rb b/lib/rexml/output.rb index 0c6cc7a7f8..96dfea570e 100644 --- a/lib/rexml/output.rb +++ b/lib/rexml/output.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/encoding' module REXML diff --git a/lib/rexml/parent.rb b/lib/rexml/parent.rb index 2a07fcacbd..3bd0a96255 100644 --- a/lib/rexml/parent.rb +++ b/lib/rexml/parent.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/child" module REXML diff --git a/lib/rexml/parseexception.rb b/lib/rexml/parseexception.rb index 0c4d55abda..7b16cd1a41 100644 --- a/lib/rexml/parseexception.rb +++ b/lib/rexml/parseexception.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML class ParseException < RuntimeError attr_accessor :source, :parser, :continued_exception diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index 6a08b8661d..80eeb0fa79 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/parseexception' require 'rexml/undefinednamespaceexception' require 'rexml/source' diff --git a/lib/rexml/parsers/lightparser.rb b/lib/rexml/parsers/lightparser.rb index 81041681c2..f0601ae51b 100644 --- a/lib/rexml/parsers/lightparser.rb +++ b/lib/rexml/parsers/lightparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/parsers/streamparser' require 'rexml/parsers/baseparser' require 'rexml/light/node' diff --git a/lib/rexml/parsers/pullparser.rb b/lib/rexml/parsers/pullparser.rb index 68a4ff7eae..8c49217553 100644 --- a/lib/rexml/parsers/pullparser.rb +++ b/lib/rexml/parsers/pullparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'forwardable' require 'rexml/parseexception' diff --git a/lib/rexml/parsers/sax2parser.rb b/lib/rexml/parsers/sax2parser.rb index a72c0a7971..1386f69c83 100644 --- a/lib/rexml/parsers/sax2parser.rb +++ b/lib/rexml/parsers/sax2parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/parsers/baseparser' require 'rexml/parseexception' require 'rexml/namespace' diff --git a/lib/rexml/parsers/streamparser.rb b/lib/rexml/parsers/streamparser.rb index 9ea65ed3d1..b271e6743e 100644 --- a/lib/rexml/parsers/streamparser.rb +++ b/lib/rexml/parsers/streamparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/parsers/baseparser" module REXML diff --git a/lib/rexml/parsers/treeparser.rb b/lib/rexml/parsers/treeparser.rb index 68edb77759..fc0993c72a 100644 --- a/lib/rexml/parsers/treeparser.rb +++ b/lib/rexml/parsers/treeparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/validation/validationexception' require 'rexml/undefinednamespaceexception' diff --git a/lib/rexml/parsers/ultralightparser.rb b/lib/rexml/parsers/ultralightparser.rb index 4e2d7a81cf..6571d119bd 100644 --- a/lib/rexml/parsers/ultralightparser.rb +++ b/lib/rexml/parsers/ultralightparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/parsers/streamparser' require 'rexml/parsers/baseparser' diff --git a/lib/rexml/parsers/xpathparser.rb b/lib/rexml/parsers/xpathparser.rb index 57767fbcd1..32b70bb798 100644 --- a/lib/rexml/parsers/xpathparser.rb +++ b/lib/rexml/parsers/xpathparser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/namespace' require 'rexml/xmltokens' diff --git a/lib/rexml/quickpath.rb b/lib/rexml/quickpath.rb index 9bec2158dd..f3ad29a93a 100644 --- a/lib/rexml/quickpath.rb +++ b/lib/rexml/quickpath.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/functions' require 'rexml/xmltokens' diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb index f89951171a..fbc0d339d8 100644 --- a/lib/rexml/rexml.rb +++ b/lib/rexml/rexml.rb @@ -1,4 +1,5 @@ # -*- encoding: utf-8 -*- +# frozen_string_literal: false # REXML is an XML toolkit for Ruby[http://www.ruby-lang.org], in Ruby. # # REXML is a _pure_ Ruby, XML 1.0 conforming, diff --git a/lib/rexml/sax2listener.rb b/lib/rexml/sax2listener.rb index 9f276eb4ed..5afdc80890 100644 --- a/lib/rexml/sax2listener.rb +++ b/lib/rexml/sax2listener.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML # A template for stream parser listeners. # Note that the declarations (attlistdecl, elementdecl, etc) are trivially diff --git a/lib/rexml/security.rb b/lib/rexml/security.rb index 593b652dc6..99b7460772 100644 --- a/lib/rexml/security.rb +++ b/lib/rexml/security.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML module Security @@entity_expansion_limit = 10_000 diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb index 87f7232232..af65cf4751 100644 --- a/lib/rexml/source.rb +++ b/lib/rexml/source.rb @@ -1,4 +1,5 @@ # coding: US-ASCII +# frozen_string_literal: false require 'rexml/encoding' module REXML diff --git a/lib/rexml/streamlistener.rb b/lib/rexml/streamlistener.rb index 3a0528c102..30c8945179 100644 --- a/lib/rexml/streamlistener.rb +++ b/lib/rexml/streamlistener.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML # A template for stream parser listeners. # Note that the declarations (attlistdecl, elementdecl, etc) are trivially diff --git a/lib/rexml/syncenumerator.rb b/lib/rexml/syncenumerator.rb index 11609bdf3d..a9d2ad7f9c 100644 --- a/lib/rexml/syncenumerator.rb +++ b/lib/rexml/syncenumerator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML class SyncEnumerator include Enumerable diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb index d3242ee46d..b132bab8f4 100644 --- a/lib/rexml/text.rb +++ b/lib/rexml/text.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/security' require 'rexml/entity' require 'rexml/doctype' diff --git a/lib/rexml/undefinednamespaceexception.rb b/lib/rexml/undefinednamespaceexception.rb index 8ebfdfd0a9..e522ed57ea 100644 --- a/lib/rexml/undefinednamespaceexception.rb +++ b/lib/rexml/undefinednamespaceexception.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/parseexception' module REXML class UndefinedNamespaceException < ParseException diff --git a/lib/rexml/validation/relaxng.rb b/lib/rexml/validation/relaxng.rb index 370efd5a98..fb52438290 100644 --- a/lib/rexml/validation/relaxng.rb +++ b/lib/rexml/validation/relaxng.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require "rexml/validation/validation" require "rexml/parsers/baseparser" diff --git a/lib/rexml/validation/validation.rb b/lib/rexml/validation/validation.rb index bab7f225a5..f0c76f976c 100644 --- a/lib/rexml/validation/validation.rb +++ b/lib/rexml/validation/validation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/validation/validationexception' module REXML diff --git a/lib/rexml/validation/validationexception.rb b/lib/rexml/validation/validationexception.rb index 4723d9e4d3..78cd63fd04 100644 --- a/lib/rexml/validation/validationexception.rb +++ b/lib/rexml/validation/validationexception.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML module Validation class ValidationException < RuntimeError diff --git a/lib/rexml/xmldecl.rb b/lib/rexml/xmldecl.rb index 465e6abeb7..a37e9f3ddc 100644 --- a/lib/rexml/xmldecl.rb +++ b/lib/rexml/xmldecl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/encoding' require 'rexml/source' diff --git a/lib/rexml/xmltokens.rb b/lib/rexml/xmltokens.rb index 4d4dd27f2d..392b47b1d3 100644 --- a/lib/rexml/xmltokens.rb +++ b/lib/rexml/xmltokens.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false module REXML # Defines a number of tokens used for parsing XML. Not for general # consumption. diff --git a/lib/rexml/xpath.rb b/lib/rexml/xpath.rb index 0f99808def..f1cb99baea 100644 --- a/lib/rexml/xpath.rb +++ b/lib/rexml/xpath.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/functions' require 'rexml/xpath_parser' diff --git a/lib/rexml/xpath_parser.rb b/lib/rexml/xpath_parser.rb index ef49a32fba..edd1127735 100644 --- a/lib/rexml/xpath_parser.rb +++ b/lib/rexml/xpath_parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false require 'rexml/namespace' require 'rexml/xmltokens' require 'rexml/attribute' |