书中epub版P335,Note的一句话说的比较困扰:
Ruby implements extend in exactly the same way, except the included class becomes the superclass of the target class’s class, or metaclass. Thus, extend allows you to add class methods to a class.”
后来经过和作者的沟通, 确定这是作者的一个错误:
详细来龙去脉可以参考这篇blog: http://tao.logdown.com/posts/240958-book-error-correcting-ruby-under-a-microscope
勘误
《Ruby Under a Microscope》热门书评
-
非常精彩
2有用 1无用 悟道 2014-11-02
一本不读会后悔的书。内容非常精彩, 把Ruby底层实现的脉络讲解的非常清晰。假如你看不懂Ruby的C源码,那么你应该读这本书, 假如你能看懂C源码,那么你更应该读一下这本书。 我有点后悔到现在才读这本书了。推荐大家阅读。...
-
勘误
2有用 0无用 悟道 2014-11-02
书中epub版P335,Note的一句话说的比较困扰:Ruby implements extend in exactly the same way, except the included class becomes the superclass of the target class’s clas...
书名: Ruby Under a Microscope
作者: Pat Shaughnessy
出版社: No Starch Press
原作名: Pat Shaughnessy
副标题: An Illustrated Guide to Ruby Internals
出版年: 2013-11
页数: 360
定价: USD 39.95
装帧: epub
ISBN: 9781593275273