+ 1

ruby check what is bool

How can you check if a boolean in ruby is true or false?

27th Aug 2018, 7:36 PM
troyan
troyan - avatar
6 Réponses
+ 1
yes but if I return the value from a method, I cant use == because it always returns false
28th Aug 2018, 10:05 AM
troyan
troyan - avatar
+ 1
troyan well if you're returning a boolean then there's no need to check if it's true or false, linking your code could help
28th Aug 2018, 10:07 AM
hinanawi
hinanawi - avatar
+ 1
I already made it with variable scope. I posted it yesterday before that idea came to mind.
28th Aug 2018, 10:29 AM
troyan
troyan - avatar
+ 1
you can see it
4th Sep 2018, 8:04 AM
troyan
troyan - avatar
0
use the '==' operator
28th Aug 2018, 9:50 AM
hinanawi
hinanawi - avatar
0
Can u tell me your real name
3rd Sep 2018, 2:16 PM
Eshan Eshan
Eshan Eshan - avatar