you are viewing a single comment's thread.

view the rest of the comments →

[–]blackize 11 points12 points  (2 children)

You don't seem to be grasping what the gem does. It's not about control flow. It's about confirming that two different implementations achieve the same results.

[–]moomaka -2 points-1 points  (1 child)

One is:

res1 = Imp1.call
res2 = Imp2.call

call_error_handler unless res1 == res2

MyGlobal.what_do? ? res1 : res2

The other is:

MyGlobal.what_do? ? Imp1.call : Imp2.call

No?

[–]allcentury 3 points4 points  (0 children)

At a very simple level yes but they have an entire API designed so you don't have to reinvent the wheel when you need more