Closed am-kantox closed 4 years ago
Hi! Why not just quick return if the b's are nil? That expression is already very complex.
It would be nice to have a unit test for that as well. I'm also just curious what kind of messages do you get? Could you show some of them?
Obviously I get NoMethodError: private method 'eval' called for nil:NilClass
on nil
s. Unfortunately, I can barely say under what conditions/circumstances it happens. I will provide the unit test for that, though the change seem too obvious to require an explicit unit test.
Apparently during test writing I met the weird behaviour on [likely] same bindings considered non equal. Please refer to the commented lines in test/test_stack_explorer.rb
for details. I blame VirtualBox
, I run tests on.
The problem is that when we compare local variables in #bindings_equal?
, we compare 2 different empty arrays, hence #equal?
returns false
.
I finally fixed that as well. It sounds being a bug to me, since new arrays were always created, forcing #bindings_equal?
to return false constantly, despite whether bindings were in fact equal.
Hi, is this still current? I'll temporarily close this, but let me know if this is still useful. Thanks!
Sometimes in Rails console I got an annoying error message on
nil
bindings. This is to safely eliminate them.