1
0
Fork 0
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:
aycabta 2019-07-01 21:14:50 +09:00
parent 90c51ca391
commit 76851381cb

View file

@ -670,10 +670,18 @@ module IRB
when "l"
ltype
when "i"
if $1
format("%" + $1 + "d", indent)
if indent < 0
if $1
"-".rjust($1.to_i)
else
"-"
end
else
indent.to_s
if $1
format("%" + $1 + "d", indent)
else
indent.to_s
end
end
when "n"
if $1