Q:

what kind of syntax is on the right side of this equation?

def is_fibonacci?(i,a=0, b=1)
  i > a ? is_fibonacci?(i, a + b, a) : a <= i if true
end

I've never seen a <= i if true
it seems to say "return true if a <=i and return false otherwise"
But are there more examples of this strange order I can look at?

A:

I've never seen a <= i if true

<= is one of the Ruby Comparison Operators:

Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.

i > a ? is_fibonacci?(i, a + b, a) : a <= i if true means - i > a ? is_fibonacci?(i, a + b, a) : a <= i the whole expression will be evaluated when your if condition results in true.

