1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

version 0.5.1, fixed some documentation related bugs and improved clarity

This commit is contained in:
John Mair 2011-02-17 20:23:58 +13:00
parent 29722bb9f5
commit d3addd8eb8
2 changed files with 8 additions and 8 deletions

View file

@ -103,7 +103,7 @@ Shows local and instance variables by default.
options[:k] = true options[:k] = true
end end
opts.on("-m", "--methods", "Display methods.") do opts.on("-m", "--methods", "Display methods (public methods by default).") do
options[:m] = true options[:m] = true
end end
@ -233,8 +233,8 @@ Shows local and instance variables by default.
OptionParser.new do |opts| OptionParser.new do |opts|
opts.banner = %{Usage: eval-file [OPTIONS] FILE opts.banner = %{Usage: eval-file [OPTIONS] FILE
Eval a Ruby script at top-level or in the current context. Eval a Ruby script at top-level or in the current context. Defaults to top-level.
e.g: eval-script -c "hello.rb" e.g: eval-file -c "hello.rb"
-- --
} }
opts.on("-c", "--context", "Eval the script in the current context.") do opts.on("-c", "--context", "Eval the script in the current context.") do
@ -252,7 +252,7 @@ e.g: eval-script -c "hello.rb"
next if options[:h] next if options[:h]
if !file_name if !file_name
output.puts "You need to specify a file name. Type `eval-script --help` for help" output.puts "You need to specify a file name. Type `eval-file --help` for help"
next next
end end
@ -331,7 +331,7 @@ e.g show-doc hello_method
doc = meth.comment doc = meth.comment
file, line = meth.source_location file, line = meth.source_location
output.puts "From #{file} @ line ~#{line}:\n--" output.puts "--\nFrom #{file} @ line ~#{line}:\n--"
output.puts doc output.puts doc
end end
@ -380,7 +380,7 @@ e.g: show-method hello_method
code = meth.source code = meth.source
file, line = meth.source_location file, line = meth.source_location
output.puts "From #{file} @ line #{line}:\n--" output.puts "--\nFrom #{file} @ line #{line}:\n--"
output.puts code output.puts code
end end
@ -396,7 +396,7 @@ e.g: show-method hello_method
meth = cmds[command_name][:action] meth = cmds[command_name][:action]
code = meth.source code = meth.source
file, line = meth.source_location file, line = meth.source_location
output.puts "From #{file} @ line #{line}:\n--" output.puts "--\nFrom #{file} @ line #{line}:\n--"
output.puts code output.puts code
else else
output.puts "No such command: #{command_name}." output.puts "No such command: #{command_name}."

View file

@ -1,3 +1,3 @@
class Pry class Pry
VERSION = "0.5.0" VERSION = "0.5.1"
end end