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

Rename "DEPRECATED" to "DISABLED"

Fix issue #817 (DEPRECATED: Use `edit` instead.)

Rename `CommandSet#deprecated_command` to `#disabled_command`. Rename
the file in "commands/", too.
This commit is contained in:
Kyrylo Silin 2013-01-24 03:39:25 +02:00
parent 6138218c94
commit 0bfad583f5
3 changed files with 5 additions and 5 deletions

View file

@ -263,13 +263,13 @@ class Pry
commands.delete(cmd.match)
end
def deprecated_command(name_of_deprecated_command, deprecation_message, matcher=name_of_deprecated_command)
create_command name_of_deprecated_command do
def disabled_command(name_of_disabled_command, message, matcher=name_of_disabled_command)
create_command name_of_disabled_command do
match matcher
description ""
define_method(:process) do
output.puts "DEPRECATED: #{deprecation_message}"
output.puts "DISABLED: #{message}"
end
end
end

View file

@ -1,2 +0,0 @@
Pry::Commands.deprecated_command("edit-method", "Use `edit` instead.")
Pry::Commands.deprecated_command("show-command", "Use show-source [command_name] instead.")

View file

@ -0,0 +1,2 @@
Pry::Commands.disabled_command("edit-method", "Use `edit` instead.")
Pry::Commands.disabled_command("show-command", "Use show-source [command_name] instead.")