You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux speedy 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Expected Behavior
moduleRescuerAVOID_RESCUING=[NoMemoryError,SignalException,Interrupt,SystemExit]defself.===(exception)puts'match invoked!'AVOID_RESCUING.none?{ |ar| ar === exception}endendbegin[:white,nil].sortrescueRescuerputs'rescued!'end
this is expected (apparently, I didn't know this before...) to invoke === on the Rescuer module, print match invoked, rescue the error and then of course print rescued and not error out. Like ruby/JRuby do:
tobi@speedy ~/github/rubykon $ rvm use 2.3.3
Using /home/tobi/.rvm/gems/ruby-2.3.3
tobi@speedy ~/github/rubykon $ ruby spec/array_sort.rb
match invoked!
rescued!
Actual Behavior
instead it errors our apparently never unvoking ===
Obviously I didn't come up with this myself. I noticed that on rubykon a lot of specs involving rspecs contain_exactly matcher fail. The matcher eventually calls safe_sort which does basically what I reproduced in this script along with the bad input where sort actually errors out :)
The text was updated successfully, but these errors were encountered:
We are using is_a? without late dispatch for rescue comparisons. I'm not sure why we'd get that so clearly wrong. There isn't a spec for it but presumably we would have though about it to make such a deliberate decision.
We are using is_a? without late dispatch for rescue comparisons. I'm not sure why we'd get that so clearly wrong. There isn't a spec for it but presumably we would have though about it to make such a deliberate decision.
Environment
Provide at least:
uname -a
)Expected Behavior
this is expected (apparently, I didn't know this before...) to invoke
===
on the Rescuer module, printmatch invoked
, rescue the error and then of course print rescued and not error out. Like ruby/JRuby do:Actual Behavior
instead it errors our apparently never unvoking
===
Context
Obviously I didn't come up with this myself. I noticed that on rubykon a lot of specs involving rspecs
contain_exactly
matcher fail. The matcher eventually calls safe_sort which does basically what I reproduced in this script along with the bad input where sort actually errors out :)The text was updated successfully, but these errors were encountered: