0

== and ===

What is the difference between == and ===?

22nd Nov 2021, 1:14 AM
Sigitas JanuĆĄauskas
Sigitas JanuĆĄauskas - avatar
3 Answers
+ 4
Sigitas Januƛauskas, Sorry bro, I was wrong ... It has different meaning in Ruby, I just found out about it after reading this ... http://www.zenruby.info/2016/05/ruby-operators-equality-comparison.html
22nd Nov 2021, 2:06 AM
Ipang
+ 3
In some other languages e.g. Javasript === means verify equality of operand types and values. Whereas == only verifies the equality of values. I guess it's the same with Ruby.
22nd Nov 2021, 1:51 AM
Ipang
+ 2
Thanks
22nd Nov 2021, 2:10 AM
Sigitas JanuĆĄauskas
Sigitas JanuĆĄauskas - avatar