我在Ruby on Rails入门经典上看到===是给case when的条件作判断用的但我用以下代码测试并未觉得有何不同:months="January","February","March","April","May","June","July","August","October","December"0.upto 11 do|month|casewhen 9==monthmonths[8,0]="September"when 11==monthmonths[10,0]="November"endputs monthsend同样,用下列代码测试也很正常:if(3===3)puts 3end它们两者究竟有什么区别,望不吝赐教,谢谢!晕死,应该发在“其他编程语言”里……
- 1 回答
- 0 关注
- 979 浏览
添加回答
举报
0/150
提交
取消