Skip to content

Commit

Permalink
Improve break help text
Browse files Browse the repository at this point in the history
Use "<" and ">" for placeholders.
  • Loading branch information
deivid-rodriguez committed Jan 2, 2019
1 parent 9dc7f93 commit 66fed07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
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

* `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

0 comments on commit 66fed07

Please sign in to comment.