Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Ruby 中,我可以覆盖三元运算符“吗?”
不,你不能:?:不是一种方法,所以你不能重新定义它。
?:
该运算符优先级表显示了哪些运算符是真正的方法,因此可以被覆盖。