mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/xmlrpc/*, test/xmlrpc/*: backported changes from HEAD into 1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ee06ebecf
commit
686c038347
7 changed files with 92 additions and 60 deletions
|
@ -86,6 +86,18 @@ module XMLRPC
|
|||
|
||||
end # class XMLParser
|
||||
|
||||
Classes = [Simple, XMLParser]
|
||||
|
||||
# yields an instance of each installed XML writer
|
||||
def self.each_installed_writer
|
||||
XMLRPC::XMLWriter::Classes.each do |klass|
|
||||
begin
|
||||
yield klass.new
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end # module XMLWriter
|
||||
|
||||
class Create
|
||||
|
@ -248,7 +260,10 @@ module XMLRPC
|
|||
if Config::ENABLE_MARSHALLING and param.class.included_modules.include? XMLRPC::Marshallable
|
||||
# convert Ruby object into Hash
|
||||
ret = {"___class___" => param.class.name}
|
||||
param.__get_instance_variables.each {|name, val|
|
||||
param.instance_variables.each {|v|
|
||||
name = v[1..-1]
|
||||
val = param.instance_variable_get(v)
|
||||
|
||||
if val.nil?
|
||||
ret[name] = val if Config::ENABLE_NIL_CREATE
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue