On Tue, Mar 24, 2020 at 06:32:10PM +0100, Daniel Leidert wrote: > Hi, > > I just worked on fixing #952027. The issue at hand is easily fixable and I > already pushed the patch to Git. Unfortunately two more test failures appeared > recently, both of the same kind: > > https://salsa.debian.org/ruby-team/ruby-declarative/-/jobs/627635#L542 > > > dup of arguments#test_0001_anonymous = 0.00 s = F > > > > > > Failure: > > dup of arguments#test_0001_anonymous > > [/tmp/build-area/ruby-declarative-0.0.10/test/heritage_test.rb:32]: > > --- expected > > +++ actual > > @@ -1 +1,3 @@ > > -"[{:method=>:property, :args=>[:name, {:render=>true, > > :nested=>{:render=>false}}], :block=>#<Proc:@heritage_test.rb:4>}]" > > +# encoding: US-ASCII > > +# valid: true > > +"[{:method=>:property, :args=>[:name, {:render=>true, > > :nested=>{:render=>false}}], :block=>#<Proc: heritage_test.rb:4>}]" > [..] > > HeritageTest#test_0001_anonymous = 0.00 s = F > > > > > > Failure: > > HeritageTest#test_0001_anonymous > > [/tmp/build-area/ruby-declarative-0.0.10/test/heritage_test.rb:17]: > > --- expected > > +++ actual > > @@ -1 +1,3 @@ > > -"[{:method=>:representation_wrap=, :args=>[true], :block=>nil}, > > {:method=>:property, :args=>[:name, {:enable=>true}], :block=>nil}, > > {:method=>:property, :args=>[:id, {}], > > :block=>#<Proc:@heritage_test.rb:4>}]" > > +# encoding: US-ASCII > > +# valid: true > > +"[{:method=>:representation_wrap=, :args=>[true], :block=>nil}, > > {:method=>:property, :args=>[:name, {:enable=>true}], :block=>nil}, > > {:method=>:property, :args=>[:id, {}], :block=>#<Proc: > > heritage_test.rb:4>}]" > > The output regarding ":block=>#<Proc:...>" doesn't match the expectation. Of > course I could easily change the expected result to match the current output. > However I'd like to understand the problem. Can someone please give me a few > buzzwords to search for or an explanation what is happening here?
The format of Proc#inspect has changed since this code was written, and also changed between 2.5 and 2.7 $ ruby2.5 -e 'puts((Proc.new{}).inspect)' #<Proc:0x000055763128c678@-e:1> $ ruby2.7 -e 'puts((Proc.new{}).inspect)' #<Proc:0x0000556befec6688 -e:1> and some testing helper code in lib/declarative/testing.rb makes assumptions about that format. there were also other issues with the test suite, such as deprecating notices from minitest. See https://github.com/apotonick/declarative/pull/5
signature.asc
Description: PGP signature