test/soap/marshal/marshaltestlib.rb in rubyjedi-soap4r-1.5.8.01 vs test/soap/marshal/marshaltestlib.rb in rubyjedi-soap4r-1.5.8.20100616125722

- old
+ new

@@ -24,15 +24,18 @@ def marshal_equal(o1, msg = nil) msg = msg ? msg + "(#{ caller[0] })" : caller[0] o2 = marshaltest(o1) assert_equal(o1.class, o2.class, msg) + iv1 = o1.instance_variables.sort iv2 = o2.instance_variables.sort assert_equal(iv1, iv2) - val1 = iv1.map {|var| o1.instance_eval {eval var}} - val2 = iv1.map {|var| o2.instance_eval {eval var}} + + val1 = iv1.map {|var| o1.instance_eval( "#{var}" )} + val2 = iv1.map {|var| o2.instance_eval( "#{var}" )} assert_equal(val1, val2, msg) + if block_given? assert_equal(yield(o1), yield(o2), msg) else assert_equal(o1, o2, msg) end