新手问题 irb 怎样列出 array 类的所有方法?[].methods.grep/^re/ 不行啊。

wgf4242 · 2013年03月18日 · 最后由 zlfera 回复于 2013年03月18日 · 2333 次阅读

看书上写的 [].methods.grep/^re/ 没有提示。。。 irb(main):007:0/ [].methods.grep/^re/ irb(main):008:0*

[].methods.grep /^re/

Array.instance_methods.sort

需要 登录 后方可回复, 如果你还没有账号请 注册新账号