J
Jeffrey Moss
------=_NextPart_000_0079_01C4E105.FCA2F2C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Here is a test case I came up with to demonstrate the problem I'm =
having. libxml is a shared object, and when I try and inherit from the =
Document class, it won't let me override the initializer. Is this =
expected behavior or am I doing something wrong?
require 'xml/libxml'
class Test < XML:ocument
def initialize(params)
print params
super('1.0')
end
end
object =3D Test.new('123')
print object.inspect
output:
<?xml version=3D"123"?>
expected output:
<?xml version=3D"1.0"?>
------=_NextPart_000_0079_01C4E105.FCA2F2C0--
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Here is a test case I came up with to demonstrate the problem I'm =
having. libxml is a shared object, and when I try and inherit from the =
Document class, it won't let me override the initializer. Is this =
expected behavior or am I doing something wrong?
require 'xml/libxml'
class Test < XML:ocument
def initialize(params)
print params
super('1.0')
end
end
object =3D Test.new('123')
print object.inspect
output:
<?xml version=3D"123"?>
expected output:
<?xml version=3D"1.0"?>
------=_NextPart_000_0079_01C4E105.FCA2F2C0--