ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]
irb(main):001:0> "0x%x" % (Object.new.id << 1)
Note the two dots that should not be there and don't match the output of o.inspect.
This was also broken in facets 2.8.4:
<"#Object:0xb7248ea4"> expected but was
In the implementation of this version there is a distinction between RUBY_VERSION < 1.8.7, but this distinction is really between 32bit and 64bit arches.
Ah, that's why I could never get consistent results form this method.
How do the object_id's differ under these two architectures?
Both formats are described in lib/core/facets/kernel/object_hexid.rb
The format described by RUBY_VERSION < "1.8.7" is for 32bit, the other for 64bit.
Okay, this fix was in 2.9.1. I hope it is finally right. I've been f*ing with that method for way too long and I wish Matz would just include it in Ruby proper as I RCR'd years ago.
I haven't been able to test 2.9.1 yet since it now uses lemon and that clashes with sqlite-2.x which also installs a binary called lemon. Once that is resolved I'll have another look at it. In any case thanks for fixing this!
Of course it does ;-/
Actually I'm pretty surprised to see they maintain their own parser just so they can parse SQL. Yacc and Bison might not be ideal but seems like a lot of extra trouble to roll your own.
In any case, name clashes SUCK. So I am attacking the problem two-fold.
I reworked Lemon's cli so there are now three commands: lemon-test, lemon-cov and lemon-gen. That should avoid bin clash. I am not happy about it, but what are you going to do?
I've also added a rake task.
Lemon::Rake::TestTask.new do |t|
These changes will go out with the next release.
The big thing I am pondering right now though is whether to move forward with the unit do test do ... nested design. My gut feeling says it's the way forward, but I hesitate and could use some feedback.
unit do test do ...
Thanks for the changes in the command names. My approach for Gentoo was to block on sqlite-2.x, but even though that is now obsoleted by sqlite-3.x it finds itself in many places on my system so it wasn't particularly easy. Having non-clashing command names makes things a lot easier.