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 1.8.7 和 ruby 1.9.1 哪一个是最顶级的?
谢谢。
答案是Object1.8 和BasicObject1.9。使用ancestors将是您自己找出这一点的一种简单方法:
Object
BasicObject
ancestors
1.class.ancestors.last #=> BasicObject