Skip to content

Avoid intermediate array from split#1093

Merged
tompng merged 1 commit into
ruby:masterfrom
Maumagnaguagno:irb_debug_setup_simpler_regex
Apr 27, 2025
Merged

Avoid intermediate array from split#1093
tompng merged 1 commit into
ruby:masterfrom
Maumagnaguagno:irb_debug_setup_simpler_regex

Conversation

@Maumagnaguagno

Copy link
Copy Markdown
Contributor

Match first sequence of non-whitespace characters.

Match first sequence of non-whitespace characters.
Comment thread lib/irb/debug.rb
Reline.output_modifier_proc = proc do |input, complete:|
unless input.strip.empty?
cmd = input.split(/\s/, 2).first
cmd = input[/\S+/]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior is changed (example input: ' info ') but the changed behavior matches better to debug command recognization rule. 👍

@tompng tompng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tompng tompng merged commit e91b21f into ruby:master Apr 27, 2025
@Maumagnaguagno Maumagnaguagno deleted the irb_debug_setup_simpler_regex branch April 27, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants