> test = false and true
=> false
> test
=> false
> test = true and false #this is the point I don't understand!
=> false
> test
=> true
ruby がこのように動作するのはなぜですか? また、この問題に遭遇しないように正しく使用するにはどうすればよいですか?
> test = false and true
=> false
> test
=> false
> test = true and false #this is the point I don't understand!
=> false
> test
=> true
ruby がこのように動作するのはなぜですか? また、この問題に遭遇しないように正しく使用するにはどうすればよいですか?