任何想法,为什么当使用某些文件不工作show-doc的pry?例如,见show-doc与String和Array相比,Set在这里:
show-doc Set
From: /Users/snowcrash/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/set.rb @ line 3:
Class name: Set
Number of lines: 57
--
set.rb - defines the Set class
++
Copyright (c) 2002-2008 Akinori MUSHA <knu@iDaemons.org>
Documentation by Akinori MUSHA and Gavin Sinclair.
All rights reserved. You can redistribute and/or modify it under the same
terms as Ruby.
$Id: set.rb 37839 2012-11-24 18:51:45Z knu $
== Overview
This library provides the Set class, which deals with a collection
show-doc String
Error: Cannot locate this method: String.
[7] pry(main)> show-doc Array
Error: Cannot locate this method: Array.
Run Code Online (Sandbox Code Playgroud)
尝试安装pry-doc gem:
gem install pry-doc
Run Code Online (Sandbox Code Playgroud)
要么
按@JayKilleen
如果你在rails环境中使用pry,你也可以尝试安装jazz_hands而不是github.com/nixme/jazz_hands,这会将pry和其他gem功能带入rails控制台.
| 归档时间: |
|
| 查看次数: |
966 次 |
| 最近记录: |