nokogiri 1.11.4-java → 1.12.0-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE-DEPENDENCIES.md +243 -22
  3. data/LICENSE.md +1 -1
  4. data/README.md +6 -5
  5. data/ext/java/nokogiri/{HtmlDocument.java → Html4Document.java} +8 -22
  6. data/ext/java/nokogiri/{HtmlElementDescription.java → Html4ElementDescription.java} +6 -6
  7. data/ext/java/nokogiri/{HtmlEntityLookup.java → Html4EntityLookup.java} +5 -5
  8. data/ext/java/nokogiri/{HtmlSaxParserContext.java → Html4SaxParserContext.java} +13 -13
  9. data/ext/java/nokogiri/{HtmlSaxPushParser.java → Html4SaxPushParser.java} +14 -14
  10. data/ext/java/nokogiri/NokogiriService.java +20 -20
  11. data/ext/java/nokogiri/XmlAttr.java +2 -2
  12. data/ext/java/nokogiri/XmlDocument.java +14 -14
  13. data/ext/java/nokogiri/XmlElementContent.java +5 -5
  14. data/ext/java/nokogiri/XmlNode.java +74 -74
  15. data/ext/java/nokogiri/XmlSaxPushParser.java +2 -2
  16. data/ext/java/nokogiri/XmlSyntaxError.java +1 -1
  17. data/ext/java/nokogiri/XmlXpathContext.java +9 -9
  18. data/ext/java/nokogiri/XsltStylesheet.java +8 -8
  19. data/ext/java/nokogiri/internals/HtmlDomParserContext.java +4 -4
  20. data/ext/java/nokogiri/internals/NokogiriHandler.java +1 -1
  21. data/ext/java/nokogiri/internals/NokogiriHelpers.java +57 -57
  22. data/ext/java/nokogiri/internals/SaveContextVisitor.java +24 -24
  23. data/ext/java/nokogiri/internals/c14n/CanonicalizerBase.java +105 -105
  24. data/ext/java/nokogiri/internals/c14n/XMLUtils.java +30 -30
  25. data/ext/java/nokogiri/internals/dom2dtm/DOM2DTM.java +87 -87
  26. data/ext/java/nokogiri/internals/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java +95 -95
  27. data/ext/nokogiri/depend +35 -34
  28. data/ext/nokogiri/extconf.rb +181 -103
  29. data/ext/nokogiri/gumbo.c +584 -0
  30. data/ext/nokogiri/{html_document.c → html4_document.c} +8 -8
  31. data/ext/nokogiri/{html_element_description.c → html4_element_description.c} +20 -18
  32. data/ext/nokogiri/{html_entity_lookup.c → html4_entity_lookup.c} +7 -7
  33. data/ext/nokogiri/{html_sax_parser_context.c → html4_sax_parser_context.c} +5 -5
  34. data/ext/nokogiri/{html_sax_push_parser.c → html4_sax_push_parser.c} +4 -4
  35. data/ext/nokogiri/libxml2_backwards_compat.c +30 -30
  36. data/ext/nokogiri/nokogiri.c +70 -38
  37. data/ext/nokogiri/xml_document.c +13 -13
  38. data/ext/nokogiri/xml_element_content.c +2 -0
  39. data/ext/nokogiri/xml_encoding_handler.c +11 -6
  40. data/ext/nokogiri/xml_namespace.c +2 -0
  41. data/ext/nokogiri/xml_node.c +118 -110
  42. data/ext/nokogiri/xml_node_set.c +20 -20
  43. data/ext/nokogiri/xml_reader.c +2 -0
  44. data/ext/nokogiri/xml_sax_parser.c +6 -6
  45. data/ext/nokogiri/xml_sax_parser_context.c +2 -0
  46. data/ext/nokogiri/xml_schema.c +2 -0
  47. data/ext/nokogiri/xml_xpath_context.c +67 -65
  48. data/ext/nokogiri/xslt_stylesheet.c +2 -1
  49. data/gumbo-parser/CHANGES.md +63 -0
  50. data/gumbo-parser/Makefile +101 -0
  51. data/gumbo-parser/THANKS +27 -0
  52. data/lib/nokogiri.rb +31 -29
  53. data/lib/nokogiri/css.rb +14 -14
  54. data/lib/nokogiri/css/parser.rb +1 -1
  55. data/lib/nokogiri/css/parser.y +1 -1
  56. data/lib/nokogiri/css/syntax_error.rb +1 -1
  57. data/lib/nokogiri/extension.rb +2 -2
  58. data/lib/nokogiri/gumbo.rb +14 -0
  59. data/lib/nokogiri/html.rb +31 -27
  60. data/lib/nokogiri/html4.rb +40 -0
  61. data/lib/nokogiri/{html → html4}/builder.rb +2 -2
  62. data/lib/nokogiri/{html → html4}/document.rb +4 -4
  63. data/lib/nokogiri/{html → html4}/document_fragment.rb +3 -3
  64. data/lib/nokogiri/{html → html4}/element_description.rb +1 -1
  65. data/lib/nokogiri/{html → html4}/element_description_defaults.rb +1 -1
  66. data/lib/nokogiri/{html → html4}/entity_lookup.rb +1 -1
  67. data/lib/nokogiri/{html → html4}/sax/parser.rb +11 -14
  68. data/lib/nokogiri/html4/sax/parser_context.rb +19 -0
  69. data/lib/nokogiri/{html → html4}/sax/push_parser.rb +5 -5
  70. data/lib/nokogiri/html5.rb +473 -0
  71. data/lib/nokogiri/html5/document.rb +74 -0
  72. data/lib/nokogiri/html5/document_fragment.rb +80 -0
  73. data/lib/nokogiri/html5/node.rb +93 -0
  74. data/lib/nokogiri/nokogiri.jar +0 -0
  75. data/lib/nokogiri/version/constant.rb +1 -1
  76. data/lib/nokogiri/version/info.rb +12 -2
  77. data/lib/nokogiri/xml.rb +35 -36
  78. data/lib/nokogiri/xml/node.rb +6 -5
  79. data/lib/nokogiri/xml/parse_options.rb +2 -0
  80. data/lib/nokogiri/xml/pp.rb +2 -2
  81. data/lib/nokogiri/xml/sax.rb +4 -4
  82. data/lib/nokogiri/xml/sax/document.rb +24 -30
  83. data/lib/nokogiri/xml/xpath.rb +2 -2
  84. data/lib/nokogiri/xslt.rb +16 -16
  85. data/lib/nokogiri/xslt/stylesheet.rb +1 -1
  86. metadata +40 -40
  87. data/lib/nokogiri/html/sax/parser_context.rb +0 -17
@@ -71,6 +71,8 @@ module Nokogiri
71
71
 
72
72
  # the default options used for parsing XML documents
73
73
  DEFAULT_XML = RECOVER | NONET
74
+ # the default options used for parsing XSLT stylesheets
75
+ DEFAULT_XSLT = RECOVER | NONET | NOENT | DTDLOAD | DTDATTR | NOCDATA
74
76
  # the default options used for parsing HTML documents
75
77
  DEFAULT_HTML = RECOVER | NOERROR | NOWARNING | NONET
76
78
  # the default options used for parsing XML schemas
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
- require 'nokogiri/xml/pp/node'
3
- require 'nokogiri/xml/pp/character_data'
2
+ require_relative "pp/node"
3
+ require_relative "pp/character_data"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- require 'nokogiri/xml/sax/document'
3
- require 'nokogiri/xml/sax/parser_context'
4
- require 'nokogiri/xml/sax/parser'
5
- require 'nokogiri/xml/sax/push_parser'
2
+ require_relative "sax/document"
3
+ require_relative "sax/parser_context"
4
+ require_relative "sax/parser"
5
+ require_relative "sax/push_parser"
@@ -2,20 +2,19 @@
2
2
  module Nokogiri
3
3
  module XML
4
4
  ###
5
- # SAX Parsers are event driven parsers. Nokogiri provides two different
6
- # event based parsers when dealing with XML. If you want to do SAX style
7
- # parsing using HTML, check out Nokogiri::HTML::SAX.
5
+ # SAX Parsers are event driven parsers. Nokogiri provides two different event based parsers when
6
+ # dealing with XML. If you want to do SAX style parsing using HTML, check out
7
+ # Nokogiri::HTML4::SAX.
8
8
  #
9
- # The basic way a SAX style parser works is by creating a parser,
10
- # telling the parser about the events we're interested in, then giving
11
- # the parser some XML to process. The parser will notify you when
12
- # it encounters events you said you would like to know about.
9
+ # The basic way a SAX style parser works is by creating a parser, telling the parser about the
10
+ # events we're interested in, then giving the parser some XML to process. The parser will notify
11
+ # you when it encounters events you said you would like to know about.
13
12
  #
14
- # To register for events, you simply subclass Nokogiri::XML::SAX::Document,
15
- # and implement the methods for which you would like notification.
13
+ # To register for events, you simply subclass Nokogiri::XML::SAX::Document, and implement the
14
+ # methods for which you would like notification.
16
15
  #
17
- # For example, if I want to be notified when a document ends, and when an
18
- # element starts, I would write a class like this:
16
+ # For example, if I want to be notified when a document ends, and when an element starts, I
17
+ # would write a class like this:
19
18
  #
20
19
  # class MyDocument < Nokogiri::XML::SAX::Document
21
20
  # def end_document
@@ -27,8 +26,7 @@ module Nokogiri
27
26
  # end
28
27
  # end
29
28
  #
30
- # Then I would instantiate a SAX parser with this document, and feed the
31
- # parser some XML
29
+ # Then I would instantiate a SAX parser with this document, and feed the parser some XML
32
30
  #
33
31
  # # Create a new parser
34
32
  # parser = Nokogiri::XML::SAX::Parser.new(MyDocument.new)
@@ -36,25 +34,21 @@ module Nokogiri
36
34
  # # Feed the parser some XML
37
35
  # parser.parse(File.open(ARGV[0]))
38
36
  #
39
- # Now my document handler will be called when each node starts, and when
40
- # then document ends. To see what kinds of events are available, take
41
- # a look at Nokogiri::XML::SAX::Document.
37
+ # Now my document handler will be called when each node starts, and when then document ends. To
38
+ # see what kinds of events are available, take a look at Nokogiri::XML::SAX::Document.
42
39
  #
43
- # Two SAX parsers for XML are available, a parser that reads from a string
44
- # or IO object as it feels necessary, and a parser that lets you spoon
45
- # feed it XML. If you want to let Nokogiri deal with reading your XML,
46
- # use the Nokogiri::XML::SAX::Parser. If you want to have fine grain
40
+ # Two SAX parsers for XML are available, a parser that reads from a string or IO object as it
41
+ # feels necessary, and a parser that lets you spoon feed it XML. If you want to let Nokogiri
42
+ # deal with reading your XML, use the Nokogiri::XML::SAX::Parser. If you want to have fine grain
47
43
  # control over the XML input, use the Nokogiri::XML::SAX::PushParser.
48
44
  module SAX
49
45
  ###
50
- # This class is used for registering types of events you are interested
51
- # in handling. All of the methods on this class are available as
52
- # possible events while parsing an XML document. To register for any
53
- # particular event, just subclass this class and implement the methods
54
- # you are interested in knowing about.
46
+ # This class is used for registering types of events you are interested in handling. All of
47
+ # the methods on this class are available as possible events while parsing an XML document. To
48
+ # register for any particular event, just subclass this class and implement the methods you
49
+ # are interested in knowing about.
55
50
  #
56
- # To only be notified about start and end element events, write a class
57
- # like this:
51
+ # To only be notified about start and end element events, write a class like this:
58
52
  #
59
53
  # class MyDocument < Nokogiri::XML::SAX::Document
60
54
  # def start_element name, attrs = []
@@ -66,8 +60,8 @@ module Nokogiri
66
60
  # end
67
61
  # end
68
62
  #
69
- # You can use this event handler for any SAX style parser included with
70
- # Nokogiri. See Nokogiri::XML::SAX, and Nokogiri::HTML::SAX.
63
+ # You can use this event handler for any SAX style parser included with Nokogiri. See
64
+ # Nokogiri::XML::SAX, and Nokogiri::HTML4::SAX.
71
65
  class Document
72
66
  ###
73
67
  # Called when an XML declaration is parsed
@@ -129,7 +123,7 @@ module Nokogiri
129
123
  end
130
124
 
131
125
  ###
132
- # Characters read between a tag. This method might be called multiple
126
+ # Characters read between a tag. This method might be called multiple
133
127
  # times given one contiguous string of characters.
134
128
  #
135
129
  # +string+ contains the character data
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
- require 'nokogiri/xml/xpath/syntax_error'
3
-
4
2
  module Nokogiri
5
3
  module XML
6
4
  module XPath
7
5
  end
8
6
  end
9
7
  end
8
+
9
+ require_relative "xpath/syntax_error"
data/lib/nokogiri/xslt.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  # frozen_string_literal: true
2
- require 'nokogiri/xslt/stylesheet'
3
-
4
2
  module Nokogiri
5
3
  class << self
6
4
  ###
@@ -22,32 +20,32 @@ module Nokogiri
22
20
  class << self
23
21
  ###
24
22
  # Parse the stylesheet in +string+, register any +modules+
25
- def parse string, modules = {}
23
+ def parse(string, modules = {})
26
24
  modules.each do |url, klass|
27
- XSLT.register url, klass
25
+ XSLT.register(url, klass)
28
26
  end
29
27
 
28
+ doc = XML::Document.parse(string, nil, nil, XML::ParseOptions::DEFAULT_XSLT)
30
29
  if Nokogiri.jruby?
31
- Stylesheet.parse_stylesheet_doc(XML.parse(string), string)
30
+ Stylesheet.parse_stylesheet_doc(doc, string)
32
31
  else
33
- Stylesheet.parse_stylesheet_doc(XML.parse(string))
32
+ Stylesheet.parse_stylesheet_doc(doc)
34
33
  end
35
34
  end
36
35
 
37
36
  ###
38
37
  # Quote parameters in +params+ for stylesheet safety
39
- def quote_params params
38
+ def quote_params(params)
40
39
  parray = (params.instance_of?(Hash) ? params.to_a.flatten : params).dup
41
- parray.each_with_index do |v,i|
42
- if i % 2 > 0
43
- parray[i]=
44
- if v =~ /'/
45
- "concat('#{ v.gsub(/'/, %q{', "'", '}) }')"
46
- else
47
- "'#{v}'";
48
- end
40
+ parray.each_with_index do |v, i|
41
+ parray[i] = if i % 2 > 0
42
+ if v =~ /'/
43
+ "concat('#{v.gsub(/'/, %q{', "'", '})}')"
44
+ else
45
+ "'#{v}'"
46
+ end
49
47
  else
50
- parray[i] = v.to_s
48
+ v.to_s
51
49
  end
52
50
  end
53
51
  parray.flatten
@@ -55,3 +53,5 @@ module Nokogiri
55
53
  end
56
54
  end
57
55
  end
56
+
57
+ require_relative "xslt/stylesheet"
@@ -18,7 +18,7 @@ module Nokogiri
18
18
  # Apply an XSLT stylesheet to an XML::Document.
19
19
  # +params+ is an array of strings used as XSLT parameters.
20
20
  # returns serialized document
21
- def apply_to document, params = []
21
+ def apply_to(document, params = [])
22
22
  serialize(transform(document, params))
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.4
4
+ version: 1.12.0
5
5
  platform: java
6
6
  authors:
7
7
  - Mike Dalessio
@@ -10,6 +10,9 @@ authors:
10
10
  - Akinori MUSHA
11
11
  - John Shahid
12
12
  - Karol Bucek
13
+ - Sam Ruby
14
+ - Craig Barnes
15
+ - Stephen Checkoway
13
16
  - Lars Kanis
14
17
  - Sergio Arbeo
15
18
  - Timothy Elliott
@@ -17,7 +20,7 @@ authors:
17
20
  autorequire:
18
21
  bindir: bin
19
22
  cert_chain: []
20
- date: 2021-05-14 00:00:00.000000000 Z
23
+ date: 2021-08-02 00:00:00.000000000 Z
21
24
  dependencies:
22
25
  - !ruby/object:Gem::Dependency
23
26
  requirement: !ruby/object:Gem::Requirement
@@ -47,20 +50,6 @@ dependencies:
47
50
  - - "~>"
48
51
  - !ruby/object:Gem::Version
49
52
  version: '2.2'
50
- - !ruby/object:Gem::Dependency
51
- requirement: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '0.41'
56
- name: concourse
57
- type: :development
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '0.41'
64
53
  - !ruby/object:Gem::Dependency
65
54
  requirement: !ruby/object:Gem::Requirement
66
55
  requirements:
@@ -219,31 +208,32 @@ extra_rdoc_files:
219
208
  - ext/nokogiri/xml_sax_parser_context.c
220
209
  - ext/nokogiri/xml_node_set.c
221
210
  - ext/nokogiri/xml_reader.c
211
+ - ext/nokogiri/html4_document.c
222
212
  - ext/nokogiri/xml_cdata.c
213
+ - ext/nokogiri/html4_entity_lookup.c
223
214
  - ext/nokogiri/xml_element_content.c
224
- - ext/nokogiri/html_entity_lookup.c
215
+ - ext/nokogiri/html4_sax_push_parser.c
225
216
  - ext/nokogiri/xml_namespace.c
217
+ - ext/nokogiri/html4_sax_parser_context.c
226
218
  - ext/nokogiri/xml_document.c
227
219
  - ext/nokogiri/xml_element_decl.c
228
220
  - ext/nokogiri/xml_schema.c
229
- - ext/nokogiri/html_document.c
230
221
  - ext/nokogiri/xml_processing_instruction.c
231
222
  - ext/nokogiri/xml_text.c
232
223
  - ext/nokogiri/xml_syntax_error.c
233
224
  - ext/nokogiri/xml_document_fragment.c
234
225
  - ext/nokogiri/xml_sax_push_parser.c
235
226
  - ext/nokogiri/xml_encoding_handler.c
236
- - ext/nokogiri/html_sax_push_parser.c
237
227
  - ext/nokogiri/xml_relax_ng.c
238
228
  - ext/nokogiri/xml_entity_decl.c
239
229
  - ext/nokogiri/test_global_handlers.c
240
230
  - ext/nokogiri/xml_node.c
241
231
  - ext/nokogiri/xml_entity_reference.c
242
232
  - ext/nokogiri/xslt_stylesheet.c
243
- - ext/nokogiri/html_sax_parser_context.c
233
+ - ext/nokogiri/html4_element_description.c
244
234
  - ext/nokogiri/xml_sax_parser.c
245
235
  - ext/nokogiri/xml_attribute_decl.c
246
- - ext/nokogiri/html_element_description.c
236
+ - ext/nokogiri/gumbo.c
247
237
  - README.md
248
238
  files:
249
239
  - Gemfile
@@ -253,11 +243,11 @@ files:
253
243
  - bin/nokogiri
254
244
  - dependencies.yml
255
245
  - ext/java/nokogiri/EncodingHandler.java
256
- - ext/java/nokogiri/HtmlDocument.java
257
- - ext/java/nokogiri/HtmlElementDescription.java
258
- - ext/java/nokogiri/HtmlEntityLookup.java
259
- - ext/java/nokogiri/HtmlSaxParserContext.java
260
- - ext/java/nokogiri/HtmlSaxPushParser.java
246
+ - ext/java/nokogiri/Html4Document.java
247
+ - ext/java/nokogiri/Html4ElementDescription.java
248
+ - ext/java/nokogiri/Html4EntityLookup.java
249
+ - ext/java/nokogiri/Html4SaxParserContext.java
250
+ - ext/java/nokogiri/Html4SaxPushParser.java
261
251
  - ext/java/nokogiri/NokogiriService.java
262
252
  - ext/java/nokogiri/XmlAttr.java
263
253
  - ext/java/nokogiri/XmlAttributeDecl.java
@@ -341,11 +331,12 @@ files:
341
331
  - ext/java/nokogiri/internals/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java
342
332
  - ext/nokogiri/depend
343
333
  - ext/nokogiri/extconf.rb
344
- - ext/nokogiri/html_document.c
345
- - ext/nokogiri/html_element_description.c
346
- - ext/nokogiri/html_entity_lookup.c
347
- - ext/nokogiri/html_sax_parser_context.c
348
- - ext/nokogiri/html_sax_push_parser.c
334
+ - ext/nokogiri/gumbo.c
335
+ - ext/nokogiri/html4_document.c
336
+ - ext/nokogiri/html4_element_description.c
337
+ - ext/nokogiri/html4_entity_lookup.c
338
+ - ext/nokogiri/html4_sax_parser_context.c
339
+ - ext/nokogiri/html4_sax_push_parser.c
349
340
  - ext/nokogiri/libxml2_backwards_compat.c
350
341
  - ext/nokogiri/nokogiri.c
351
342
  - ext/nokogiri/test_global_handlers.c
@@ -375,6 +366,9 @@ files:
375
366
  - ext/nokogiri/xml_text.c
376
367
  - ext/nokogiri/xml_xpath_context.c
377
368
  - ext/nokogiri/xslt_stylesheet.c
369
+ - gumbo-parser/CHANGES.md
370
+ - gumbo-parser/Makefile
371
+ - gumbo-parser/THANKS
378
372
  - lib/isorelax.jar
379
373
  - lib/jing.jar
380
374
  - lib/nekodtd.jar
@@ -391,16 +385,22 @@ files:
391
385
  - lib/nokogiri/css/xpath_visitor.rb
392
386
  - lib/nokogiri/decorators/slop.rb
393
387
  - lib/nokogiri/extension.rb
388
+ - lib/nokogiri/gumbo.rb
394
389
  - lib/nokogiri/html.rb
395
- - lib/nokogiri/html/builder.rb
396
- - lib/nokogiri/html/document.rb
397
- - lib/nokogiri/html/document_fragment.rb
398
- - lib/nokogiri/html/element_description.rb
399
- - lib/nokogiri/html/element_description_defaults.rb
400
- - lib/nokogiri/html/entity_lookup.rb
401
- - lib/nokogiri/html/sax/parser.rb
402
- - lib/nokogiri/html/sax/parser_context.rb
403
- - lib/nokogiri/html/sax/push_parser.rb
390
+ - lib/nokogiri/html4.rb
391
+ - lib/nokogiri/html4/builder.rb
392
+ - lib/nokogiri/html4/document.rb
393
+ - lib/nokogiri/html4/document_fragment.rb
394
+ - lib/nokogiri/html4/element_description.rb
395
+ - lib/nokogiri/html4/element_description_defaults.rb
396
+ - lib/nokogiri/html4/entity_lookup.rb
397
+ - lib/nokogiri/html4/sax/parser.rb
398
+ - lib/nokogiri/html4/sax/parser_context.rb
399
+ - lib/nokogiri/html4/sax/push_parser.rb
400
+ - lib/nokogiri/html5.rb
401
+ - lib/nokogiri/html5/document.rb
402
+ - lib/nokogiri/html5/document_fragment.rb
403
+ - lib/nokogiri/html5/node.rb
404
404
  - lib/nokogiri/jruby/dependencies.rb
405
405
  - lib/nokogiri/nokogiri.jar
406
406
  - lib/nokogiri/syntax_error.rb
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
- module Nokogiri
3
- module HTML
4
- module SAX
5
- ###
6
- # Context for HTML SAX parsers. This class is usually not instantiated
7
- # by the user. Instead, you should be looking at
8
- # Nokogiri::HTML::SAX::Parser
9
- class ParserContext < Nokogiri::XML::SAX::ParserContext
10
- def self.new thing, encoding = 'UTF-8'
11
- [:read, :close].all? { |x| thing.respond_to?(x) } ? super :
12
- memory(thing, encoding)
13
- end
14
- end
15
- end
16
- end
17
- end