ox 1.8.2 → 1.8.3

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

Potentially problematic release.


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

Files changed (4) hide show
  1. data/README.md +2 -4
  2. data/ext/ox/sax.c +3 -1
  3. data/lib/ox/version.rb +1 -1
  4. metadata +2 -2
data/README.md CHANGED
@@ -34,11 +34,9 @@ A fast XML parser and Object marshaller as a Ruby gem.
34
34
 
35
35
  ## <a name="release">Release Notes</a>
36
36
 
37
- ### Release 1.8.2
37
+ ### Release 1.8.3
38
38
 
39
- - Ox::Element.locate no longer raises and exception if there are no child nodes.
40
-
41
- - Dumping an XML document no longer puts a carriage return after processing instructions.
39
+ - Sax parser now honors encoding specification in the xml prolog correctly.
42
40
 
43
41
  ## <a name="description">Description</a>
44
42
 
@@ -539,10 +539,12 @@ read_instruction(SaxDrive dr) {
539
539
  char *cend;
540
540
  const char *err;
541
541
  VALUE target = Qnil;
542
+ int is_xml;
542
543
 
543
544
  if ('\0' == (c = read_name_token(dr))) {
544
545
  return -1;
545
546
  }
547
+ is_xml = (0 == strcmp("xml", dr->str));
546
548
  if (dr->has_instruct || dr->has_end_instruct) {
547
549
  target = rb_str_new2(dr->str);
548
550
  }
@@ -556,7 +558,7 @@ read_instruction(SaxDrive dr) {
556
558
  read_content(dr, content, sizeof(content) - 1);
557
559
  cend = dr->cur;
558
560
  dr->cur = dr->str;
559
- if (0 != (err = read_attrs(dr, c, '?', '?', (0 == strcmp("xml", dr->str))))) {
561
+ if (0 != (err = read_attrs(dr, c, '?', '?', is_xml))) {
560
562
  if (dr->has_text) {
561
563
  VALUE args[1];
562
564
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Ox
3
3
  # Current version of the module.
4
- VERSION = '1.8.2'
4
+ VERSION = '1.8.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-18 00:00:00.000000000 Z
12
+ date: 2013-01-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! "A fast XML parser and object serializer that uses only standard C
15
15
  lib.\n \nOptimized XML (Ox), as the name implies was written to provide