mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Show "-" if indent level is negative
This commit is contained in:
parent
90c51ca391
commit
76851381cb
1 changed files with 11 additions and 3 deletions
14
lib/irb.rb
14
lib/irb.rb
|
@ -670,10 +670,18 @@ module IRB
|
||||||
when "l"
|
when "l"
|
||||||
ltype
|
ltype
|
||||||
when "i"
|
when "i"
|
||||||
if $1
|
if indent < 0
|
||||||
format("%" + $1 + "d", indent)
|
if $1
|
||||||
|
"-".rjust($1.to_i)
|
||||||
|
else
|
||||||
|
"-"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
indent.to_s
|
if $1
|
||||||
|
format("%" + $1 + "d", indent)
|
||||||
|
else
|
||||||
|
indent.to_s
|
||||||
|
end
|
||||||
end
|
end
|
||||||
when "n"
|
when "n"
|
||||||
if $1
|
if $1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue