Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve break help text #527

Merged
merged 1 commit into from
Jan 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

* [#527](https://github.com/deivid-rodriguez/byebug/pull/527): `break` help text to clarify placeholders from literals.

### Removed

* Support for MRI 2.2. Byebug no longer installs on this platform.
Expand Down
4 changes: 2 additions & 2 deletions lib/byebug/commands/break.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def self.regexp

def self.description
<<-DESCRIPTION
b[reak] [file:]line [if expr]
b[reak] [module::...]class(.|#)method [if expr]
b[reak] [<file>:]<line> [if <expr>]
b[reak] [<module>::...]<class>(.|#)<method> [if <expr>]

They can be specified by line or method and an expression can be added
for conditionally enabled breakpoints.
Expand Down
2 changes: 1 addition & 1 deletion test/commands/break_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def test_shows_info_about_setting_breakpoints_when_using_just_break
enter "break", "cont"
debug_code(program)

check_output_includes(/b\[reak\] \[file:\]line \[if expr\]/)
check_output_includes(/b\[reak\] \[<file>:\]<line> \[if <expr>\]/)
end

def test_setting_breakpoint_uses_new_source
Expand Down
4 changes: 2 additions & 2 deletions test/commands/help_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def test_help_with_specific_command_shows_help_for_it
debug_code(minimal_program)

expected_output = split_lines <<-TXT
b[reak] [file:]line [if expr]
b[reak] [module::...]class(.|#)method [if expr]
b[reak] [<file>:]<line> [if <expr>]
b[reak] [<module>::...]<class>(.|#)<method> [if <expr>]

Sets breakpoints in the source code
TXT
Expand Down