libxml-ruby 2.0.5-x86-mingw32 → 2.0.6-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +6 -0
- data/ext/libxml/ruby_xml_document.c +1 -3
- data/ext/libxml/ruby_xml_encoding.c +28 -22
- data/ext/libxml/ruby_xml_version.h +3 -3
- data/lib/1.8/libxml_ruby.so +0 -0
- data/lib/1.9/libxml_ruby.so +0 -0
- data/test/model/shiporder.xml +2 -2
- data/test/tc_schema.rb +1 -1
- metadata +4 -4
data/HISTORY
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
= Release History
|
2
2
|
|
3
|
+
== 2.0.6 / 2011-05-23 Charlie Savage
|
4
|
+
|
5
|
+
* Fix segfault that sometimes occurred when looking up encodings on 1.9.
|
6
|
+
In some cases the Ruby encoding infrastructure was not properly
|
7
|
+
initialized (nkriege).
|
8
|
+
|
3
9
|
== 2.0.5 / 2011-05-05 Charlie Savage
|
4
10
|
|
5
11
|
* Document#validate_dtd would sometimes cause segmentation faults due to
|
@@ -894,7 +894,6 @@ static VALUE rxml_document_validate_relaxng(VALUE self, VALUE relaxng)
|
|
894
894
|
*/
|
895
895
|
static VALUE rxml_document_validate_dtd(VALUE self, VALUE dtd)
|
896
896
|
{
|
897
|
-
VALUE error = Qnil;
|
898
897
|
xmlValidCtxt ctxt;
|
899
898
|
xmlDocPtr xdoc;
|
900
899
|
xmlDtdPtr xdtd;
|
@@ -904,11 +903,10 @@ static VALUE rxml_document_validate_dtd(VALUE self, VALUE dtd)
|
|
904
903
|
|
905
904
|
/* Setup context */
|
906
905
|
memset(&ctxt, 0, sizeof(xmlValidCtxt));
|
907
|
-
ctxt.userData = &error;
|
908
906
|
|
909
907
|
if (xmlValidateDtd(&ctxt, xdoc, xdtd))
|
910
908
|
{
|
911
|
-
return
|
909
|
+
return Qtrue;
|
912
910
|
}
|
913
911
|
else
|
914
912
|
{
|
@@ -75,74 +75,80 @@ static VALUE rxml_encoding_to_s(VALUE klass, VALUE encoding)
|
|
75
75
|
}
|
76
76
|
|
77
77
|
#ifdef HAVE_RUBY_ENCODING_H
|
78
|
+
/*
|
79
|
+
* Converts an xmlCharEncoding enum value into a Ruby Encoding object (available
|
80
|
+
* on Ruby 1.9.* and higher).
|
81
|
+
*/
|
78
82
|
VALUE rxml_xml_encoding_to_rb_encoding(VALUE klass, xmlCharEncoding xmlEncoding)
|
79
83
|
{
|
80
|
-
|
84
|
+
const char* encodingName;
|
81
85
|
|
82
86
|
switch (xmlEncoding)
|
83
87
|
{
|
84
88
|
case XML_CHAR_ENCODING_UTF8:
|
85
|
-
|
89
|
+
encodingName = "UTF-8";
|
86
90
|
break;
|
87
91
|
case XML_CHAR_ENCODING_UTF16LE:
|
88
|
-
|
92
|
+
encodingName = "UTF-16LE";
|
89
93
|
break;
|
90
94
|
case XML_CHAR_ENCODING_UTF16BE:
|
91
|
-
|
95
|
+
encodingName = "UTF-16BE";
|
92
96
|
break;
|
93
97
|
case XML_CHAR_ENCODING_UCS4LE:
|
94
|
-
|
98
|
+
encodingName = "UCS-4LE";
|
95
99
|
break;
|
96
100
|
case XML_CHAR_ENCODING_UCS4BE:
|
97
|
-
|
101
|
+
encodingName = "UCS-4BE";
|
98
102
|
break;
|
99
103
|
case XML_CHAR_ENCODING_UCS2:
|
100
|
-
|
104
|
+
encodingName = "UCS-2";
|
101
105
|
break;
|
102
106
|
case XML_CHAR_ENCODING_8859_1:
|
103
|
-
|
107
|
+
encodingName = "ISO8859-1";
|
104
108
|
break;
|
105
109
|
case XML_CHAR_ENCODING_8859_2:
|
106
|
-
|
110
|
+
encodingName = "ISO8859-2";
|
107
111
|
break;
|
108
112
|
case XML_CHAR_ENCODING_8859_3:
|
109
|
-
|
113
|
+
encodingName = "ISO8859-3";
|
110
114
|
break;
|
111
115
|
case XML_CHAR_ENCODING_8859_4:
|
112
|
-
|
116
|
+
encodingName = "ISO8859-4";
|
113
117
|
break;
|
114
118
|
case XML_CHAR_ENCODING_8859_5:
|
115
|
-
|
119
|
+
encodingName = "ISO8859-5";
|
116
120
|
break;
|
117
121
|
case XML_CHAR_ENCODING_8859_6:
|
118
|
-
|
122
|
+
encodingName = "ISO8859-6";
|
119
123
|
break;
|
120
124
|
case XML_CHAR_ENCODING_8859_7:
|
121
|
-
|
125
|
+
encodingName = "ISO8859-7";
|
122
126
|
break;
|
123
127
|
case XML_CHAR_ENCODING_8859_8:
|
124
|
-
|
128
|
+
encodingName = "ISO8859-8";
|
125
129
|
break;
|
126
130
|
case XML_CHAR_ENCODING_8859_9:
|
127
|
-
|
131
|
+
encodingName = "ISO8859-9";
|
128
132
|
break;
|
129
133
|
case XML_CHAR_ENCODING_2022_JP:
|
130
|
-
|
134
|
+
encodingName = "ISO-2022-JP";
|
131
135
|
break;
|
132
136
|
case XML_CHAR_ENCODING_SHIFT_JIS:
|
133
|
-
|
137
|
+
encodingName = "SHIFT-JIS";
|
134
138
|
break;
|
135
139
|
case XML_CHAR_ENCODING_EUC_JP:
|
136
|
-
|
140
|
+
encodingName = "EUC-JP";
|
137
141
|
break;
|
138
142
|
case XML_CHAR_ENCODING_ASCII:
|
139
|
-
|
143
|
+
encodingName = "US-ASCII";
|
140
144
|
break;
|
141
145
|
default:
|
142
146
|
/* Covers XML_CHAR_ENCODING_ERROR, XML_CHAR_ENCODING_NONE, XML_CHAR_ENCODING_EBCDIC */
|
143
|
-
|
147
|
+
encodingName = "ASCII-8BIT";
|
148
|
+
break;
|
144
149
|
}
|
145
|
-
|
150
|
+
|
151
|
+
return rb_enc_from_encoding(rb_enc_find(encodingName));
|
146
152
|
}
|
147
153
|
|
148
154
|
/*
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/* Don't nuke this block! It is used for automatically updating the
|
2
2
|
* versions below. VERSION = string formatting, VERNUM = numbered
|
3
3
|
* version for inline testing: increment both or none at all.*/
|
4
|
-
#define RUBY_LIBXML_VERSION "2.0.
|
5
|
-
#define RUBY_LIBXML_VERNUM
|
4
|
+
#define RUBY_LIBXML_VERSION "2.0.6"
|
5
|
+
#define RUBY_LIBXML_VERNUM 206
|
6
6
|
#define RUBY_LIBXML_VER_MAJ 2
|
7
7
|
#define RUBY_LIBXML_VER_MIN 0
|
8
|
-
#define RUBY_LIBXML_VER_MIC
|
8
|
+
#define RUBY_LIBXML_VER_MIC 6
|
9
9
|
#define RUBY_LIBXML_VER_PATCH 0
|
data/lib/1.8/libxml_ruby.so
CHANGED
Binary file
|
data/lib/1.9/libxml_ruby.so
CHANGED
Binary file
|
data/test/model/shiporder.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<shiporder orderid="889923"
|
3
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:noNamespaceSchemaLocation="shiporder.xsd">
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
+
xsi:noNamespaceSchemaLocation="shiporder.xsd">
|
5
5
|
<orderperson>John Smith</orderperson>
|
6
6
|
<shipto>
|
7
7
|
<name>Ola Nordmann</name>
|
data/test/tc_schema.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libxml-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 6
|
10
|
+
version: 2.0.6
|
11
11
|
platform: x86-mingw32
|
12
12
|
authors:
|
13
13
|
- Ross Bamform
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2011-05-
|
23
|
+
date: 2011-05-23 00:00:00 Z
|
24
24
|
dependencies: []
|
25
25
|
|
26
26
|
description: " The Libxml-Ruby project provides Ruby language bindings for the GNOME\n Libxml2 XML toolkit. It is free software, released under the MIT License.\n Libxml-ruby's primary advantage over REXML is performance - if speed\n is your need, these are good libraries to consider, as demonstrated\n by the informal benchmark below.\n"
|