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

- old
+ new

@@ -1,5 +1,6 @@ +# encoding: ASCII-8BIT module MarshalTestLib # include this module to a Test::Unit::TestCase and definde encode(o) and # decode(s) methods. e.g. # # def encode(o) @@ -370,16 +371,16 @@ class MyTime < Time; def initialize(v, *args) super(*args); @v = v; end end def test_time # once there was a bug caused by usec overflow. try a little harder. 10.times do t = Time.now - marshal_equal(t, t.usec.to_s) + marshal_equal(t,t.usec.to_s) {|t| t.tv_usec } end end def test_time_subclass - marshal_equal(MyTime.new(10)) + marshal_equal(MyTime.new(10)) {|t| t.tv_usec } end def test_time_ivar o1 = Time.now o1.instance_eval { @iv = 1 } @@ -422,10 +423,10 @@ @v = 1 class C; self; end end assert_raises(TypeError) { marshaltest(o) } assert_raises(TypeError) { marshaltest(c) } - assert_raises(TypeError) { marshaltest(ARGF) } + assert_raises(TypeError) { marshaltest(ARGF) } unless (RUBY_VERSION.to_f >= 1.9) # Rubyjedi: ARGF is no longer a singleton in Ruby 1.9 and above assert_raises(TypeError) { marshaltest(ENV) } end def test_extend o = Object.new