diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-03-31 20:52:05 +0300 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-03-31 20:56:09 +0300 |
commit | 9f3ec4bc2318f879c493cc632145468f87d74442 (patch) | |
tree | 58554b715f528a99cce1d5c46d84725274450dc3 | |
parent | ea05d45f02a737d28f62c1ecd9d465e01c675c77 (diff) | |
download | pry-9f3ec4bc2318f879c493cc632145468f87d74442.tar.gz |
command_set: delete #disabled_commands
* the name of the method is not a verb, which is confusing
* commands have aliases
* we can deprecate commands at the place where they are defined. We would've
avoided this case with `edit-method` where the command was deprecated for
years but never removed. This is because it was deprecated using
`#disabled_commands` at an unexpected location.
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | lib/pry/command_set.rb | 11 |
2 files changed, 3 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c8ab8c5..a443510e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,7 +60,9 @@ `gem-readme`, `gem-search`, `gem-stats` ([#1981](https://github.com/pry/pry/pull/1981)) * Deleted deprecated commands: `edit-method` and `show-command` - ([#1981](https://github.com/pry/pry/pull/1981)) + ([#2001](https://github.com/pry/pry/pull/2001)) +* Deleted `Pry::Command#disabled_commands` + ([#2001](https://github.com/pry/pry/pull/2001)) #### Bug fixes diff --git a/lib/pry/command_set.rb b/lib/pry/command_set.rb index d4e4cd85..737a5cf7 100644 --- a/lib/pry/command_set.rb +++ b/lib/pry/command_set.rb @@ -236,17 +236,6 @@ class Pry @commands.delete(cmd.match) end - def disabled_command(disabled_command_name, message, matcher = disabled_command_name) - create_command(disabled_command_name) do - match matcher - description "" - - define_method(:process) do - output.puts "DISABLED: #{message}" - end - end - end - # Sets or gets the description for a command (replacing the old # description). Returns current description if no description # parameter provided. |