From c42caac6807ff9ae59f34bc77ab3fc4b2cb3e733 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 29 Mar 2014 22:07:33 +0900 Subject: [PATCH] Fix typo in show_source.rb 1. delete EXPRESSION from usage in BANNER, because user can use EXPRESSION only when -e option is given. 2. add `show-source Pry.foo -e` example to BANNER. 3. rename parameter of options method from `opts` to `opt`, because in other commands `opt` is used. --- lib/pry/commands/show_source.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pry/commands/show_source.rb b/lib/pry/commands/show_source.rb index 859a3714..f7c11b8d 100644 --- a/lib/pry/commands/show_source.rb +++ b/lib/pry/commands/show_source.rb @@ -7,7 +7,7 @@ class Pry description 'Show the source for a method or class.' banner <<-'BANNER' - Usage: show-source [OPTIONS] [METH|CLASS|EXPRESSION] + Usage: show-source [OPTIONS] [METH|CLASS] Aliases: $, show-method Show the source for a method or class. Tries instance methods first and then @@ -18,14 +18,15 @@ class Pry show-source Pry#rep # source for Pry#rep method show-source Pry # for Pry class show-source Pry -a # for all Pry class definitions (all monkey patches) + show-source Pry.foo -e # for class of Pry.foo show-source Pry --super # for superclass of Pry (Object class) https://github.com/pry/pry/wiki/Source-browsing#wiki-Show_method BANNER - def options(opts) - opts.on :e, :eval, "evaluate the command's input as a ruby expression and lookup the source of its return value" - super(opts) + def options(opt) + opt.on :e, :eval, "evaluate the command's input as a ruby expression and lookup the source of its return value" + super(opt) end def process