Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Pry does not properly support methods/classes in its 'gist' command #609

Closed
ddd opened this Issue Jun 25, 2012 · 2 comments

Comments

Projects
None yet
3 participants

ddd commented Jun 25, 2012

[1] pry(main)> gist -d Kernel
Error: The method 'Kernel' could not be found. Type gist --help for help.
[2] pry(main)> gist -d Array
NoMethodError: undefined method code_type' for #<#<Class:0x007fe391503fa8>:0x007fe3938f2068> from /Users/me/.rvm/gems/ruby-1.9.3-p194@dtf/bundler/gems/pry-37d9e5cbb952/lib/pry/default_commands/gist.rb:43:inblock (2 levels) in options'

Member

Mon-Ouie commented Jun 25, 2012

The first line isn't a bug. Kernel is a module, not a method. Modules don't have a source location and can be reopened (not to mentioned Kernel, in YARV, is defined in a C file).

ddd commented Jun 25, 2012

Right, I included for completeness after discussing the initial with banisterfiend. It was also included because he was thinking of making it return a list of the methods like ri Kernel does. But the 2nd is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment