开发者

Overload ! operator in Ruby

Is it possible to overload ! operator in Rub开发者_运维问答y language?


yes, you can overload this ! in Ruby 1.9, see here http://phrogz.net/programmingruby/language.html#table_18.4 , in this url they had given what are the operators, which are overloaded in Ruby


Yes, in Ruby 1.9 ! is a method and can be overridden.

Source

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜