class Object
attr_reader :with
alias :orig_initialize :initialize
def initialize
orig_initialize
@with = :you
end
end
还有警告....
warning: redefining Object#initialize may cause infinite loop
大概是这样的吧,稍有不慎就无限循环了,不过我才不怕
我不怕
| 别看了,看不懂的 |
| 真的,别看了 |
| Powered by 5DBlog.com |
回复Comments
作者:
{commentrecontent}