1)
- @client.getAvatars(@accountName).each do |avatar|
=avatar['deleted']
输出:假假真
2)
- @client.getAvatars(@accountName).each do |avatar|
- if(avatar['deleted'] == 'false')
=avatar['deleted']
空输出
3)
- @client.getAvatars(@accountName).each do |avatar|
- if(avatar['deleted'] != 'false')
=avatar['deleted']
输出:假假真
我不明白它为什么如此奇怪,你能给我解释一下吗?
PS:我的工作变体是
- @client.getAvatars(@accountName).each do |avatar|
- if(!avatar['deleted'])
=avatar['deleted']
输出:假假