mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
When you create a class command, there is a problem with `:listing`
option, which doesn't carry the correct default value. Consider the
example:
class MakeMeHappy < Pry::ClassCommand
match 'woot'
end
`MakeMeHappy` command matches against 'woot' String, but its `:listing`
option is set to the "nil" String, which is incorrect. We can fix it by
setting `:listing` explicitly:
command_options :listing => 'woot'
It's a repetitive task, so we can automate it. Holy smoke, this why we
all use computers, after all!
With help of this commit there is no need to set `:listing` manually.
Pry will handle it for you.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
|
||
|---|---|---|
| .. | ||
| commands | ||
| fixtures | ||
| helpers | ||
| cli_spec.rb | ||
| code_object_spec.rb | ||
| code_spec.rb | ||
| command_helpers_spec.rb | ||
| command_integration_spec.rb | ||
| command_set_spec.rb | ||
| command_spec.rb | ||
| completion_spec.rb | ||
| control_d_handler_spec.rb | ||
| exception_whitelist_spec.rb | ||
| helper.rb | ||
| history_array_spec.rb | ||
| hooks_spec.rb | ||
| indent_spec.rb | ||
| input_stack_spec.rb | ||
| method_spec.rb | ||
| prompt_spec.rb | ||
| pry_defaults_spec.rb | ||
| pry_history_spec.rb | ||
| pry_output_spec.rb | ||
| pry_spec.rb | ||
| sticky_locals_spec.rb | ||
| syntax_checking_spec.rb | ||
| wrapped_module_spec.rb | ||