Mailinglist Archive: yast-commit (2080 mails)

< Previous Next >
[yast-commit] <rest-service> network : Argh, XmlMarkup even overrides basic Object methods.
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Thu, 10 Sep 2009 13:58:18 +0200
  • Message-id: <E1Mm10w-0002Ru-H2@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit db86daa449277175bb549b85e49210641f2a55bb
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Thu Sep 10 13:58:18 2009 +0200

Argh, XmlMarkup even overrides basic Object methods.

Using __send__ instead of send fixes this.
---
plugins/patches/app/models/resolvable.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/patches/app/models/resolvable.rb
b/plugins/patches/app/models/resolvable.rb
index 9710a48..f96a77e 100644
--- a/plugins/patches/app/models/resolvable.rb
+++ b/plugins/patches/app/models/resolvable.rb
@@ -58,7 +58,7 @@ public
xml = options[:builder] ||= Builder::XmlMarkup.new(options)
xml.instruct! unless options[:skip_instruct]

- xml.send tag.to_sym do
+ xml.__send__ tag.to_sym do
xml.tag!(:resolvable_id, @resolvable_id, {:type => "integer"} )
xml.tag!(:kind, @kind )
xml.tag!(:name, @name )
@@ -71,7 +71,7 @@ public
end

def to_json( options = {} )
- hash = Hash.from_xml(to_xml())
+ hash = Hash.from_xml(self.to_xml())
return hash.to_json
end

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages