diff options
| author | tomoya ishida <tomoyapenguin@gmail.com> | 2024-04-18 23:46:36 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-04-18 14:46:55 +0000 |
| commit | ff599aea7cb810ca5284c10184f435101e4b9349 (patch) | |
| tree | 520e103a1f331d6199e39b3275bcc08cbc80146d /lib | |
| parent | 81240493a32fc36182338eb0969203e57487a5ad (diff) | |
[ruby/irb] Fix % escape in prompt format
(https://github.com/ruby/irb/pull/927)
https://github.com/ruby/irb/commit/08eee25d28
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/irb.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index f7019ab0ea..d6afd6e510 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -1457,7 +1457,7 @@ module IRB end def format_prompt(format, ltype, indent, line_no) # :nodoc: - format.gsub(/%([0-9]+)?([a-zA-Z])/) do + format.gsub(/%([0-9]+)?([a-zA-Z%])/) do case $2 when "N" @context.irb_name @@ -1490,7 +1490,7 @@ module IRB line_no.to_s end when "%" - "%" + "%" unless $1 end end end |
