ox 1.8.3 → 1.8.4

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.

data/README.md CHANGED
@@ -34,6 +34,10 @@ 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.4
38
+
39
+ - Applied patch by mcarpenter to fix solaris issues with build and remaining undefined @nodes.
40
+
37
41
  ### Release 1.8.3
38
42
 
39
43
  - Sax parser now honors encoding specification in the xml prolog correctly.
@@ -31,7 +31,7 @@ dflags = {
31
31
  'NEEDS_UIO' => (RUBY_PLATFORM =~ /(win|w)32$/) ? 0 : 1,
32
32
  }
33
33
 
34
- if RUBY_PLATFORM =~ /(win|w)32$/
34
+ if RUBY_PLATFORM =~ /(win|w)32$/ || RUBY_PLATFORM =~ /solaris2\.10/
35
35
  dflags['NEEDS_STPCPY'] = nil
36
36
  end
37
37
 
@@ -77,6 +77,9 @@ typedef struct _SaxDrive {
77
77
  #endif
78
78
  } *SaxDrive;
79
79
 
80
+ #ifdef NEEDS_STPCPY
81
+ char *stpncpy(char *dest, const char *src, size_t n);
82
+ #endif
80
83
  static void sax_drive_init(SaxDrive dr, VALUE handler, VALUE io, int convert);
81
84
  static void sax_drive_cleanup(SaxDrive dr);
82
85
  static int sax_drive_read(SaxDrive dr);
@@ -106,7 +109,7 @@ static int read_from_str(SaxDrive dr);
106
109
 
107
110
  static VALUE sax_value_class;
108
111
 
109
- /* This is only for CentOS 5.4 with Ruby 1.9.3-p0 and for OS X 10.6. */
112
+ /* This is only for CentOS 5.4 with Ruby 1.9.3-p0 and for OS X 10.6 and Solaris 10. */
110
113
  #ifdef NEEDS_STPCPY
111
114
  char *stpncpy(char *dest, const char *src, size_t n) {
112
115
  size_t cnt = strlen(src) + 1;
@@ -18,7 +18,7 @@ module Ox
18
18
 
19
19
  # Returns the first Element in the document.
20
20
  def root()
21
- unless @nodes.nil?
21
+ unless !instance_variable_defined?(:@nodes) || @nodes.nil?
22
22
  @nodes.each do |n|
23
23
  return n if n.is_a?(::Ox::Element)
24
24
  end
@@ -79,7 +79,7 @@ module Ox
79
79
  # Returns the first String in the elements nodes array or nil if there is
80
80
  # no String node.
81
81
  def text()
82
- @nodes.each { |n| return n if n.is_a?(String) }
82
+ nodes.each { |n| return n if n.is_a?(String) }
83
83
  nil
84
84
  end
85
85
 
@@ -134,7 +134,7 @@ module Ox
134
134
  def method_missing(id, *args, &block)
135
135
  ids = id.to_s
136
136
  i = args[0].to_i # will be 0 if no arg or parsing fails
137
- @nodes.each do |n|
137
+ nodes.each do |n|
138
138
  if (n.is_a?(Element) || n.is_a?(Instruct)) && (n.value == id || n.value == ids)
139
139
  return n if 0 == i
140
140
  i -= 1
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Ox
3
3
  # Current version of the module.
4
- VERSION = '1.8.3'
4
+ VERSION = '1.8.4'
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.3
4
+ version: 1.8.4
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-24 00:00:00.000000000 Z
12
+ date: 2013-01-25 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