In my ruby 2.2.3 code I have a method in a class as follow
auth_token.application.kind == 'partner'
Comparable#== will no more rescue exceptions of #<=> in the next release.
'partner' == auth_token.application.kind
I guess in the first case auth_token.application.kind is returning an object that is not a standard Ruby String, and it is therefore executing that object's == method (which includes code to output the warning you see).
In the second case it is executing the 'partner' string's == method, which is just the standard Ruby String == method which does not generate this warning.
Note that in Ruby == is a method, if you were to write your example this way the reason for the difference would probably seem more clear: