Bug #1239
xpath.rb doesn't work with ruby 1.9.2p0 (2010-08-18 revision 29036)
Status: | Closed | Start date: | 04/17/2012 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Daniel Molina | % Done: | 100% | |
Category: | Core & System | |||
Target version: | Release 3.6 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 3.4 |
Description
Hi,
Due to this ruby bug ( http://bugs.ruby-lang.org/issues/show/4161 ), src/datastore_mad/remotes/xpath.rb doesn't work correctly with ruby 1.9.2p0, a common ruby 1.9 version installed in many stable linux distributions.
This simple patch fixes it:
--- src/datastore_mad/remotes/xpath.rb.orig 2012-04-17 16:05:44.124354793 +0100 +++ src/datastore_mad/remotes/xpath.rb 2012-04-17 16:05:54.683955115 +0100 @@ -46,7 +46,7 @@ xml = REXML::Document.new(tmp).root ARGV.each do |xpath| - element = xml.elements[xpath] + element = xml.elements[xpath.dup] values << element.text.to_s if !element.nil? values << "\0" end
Associated revisions
bug #1239: xpath.rb doesn't work with ruby 1.9.2p0
History
#1 Updated by Ruben S. Montero about 9 years ago
- Target version set to Release 3.6
Scheduling this for the next release...
Thanks you for the great feedback!
#2 Updated by Daniel Molina about 9 years ago
- Status changed from New to Closed
- Assignee set to Daniel Molina
- % Done changed from 0 to 100
- Resolution set to fixed
I have included the patch in master
Thanks for the feedback