зеркало из https://github.com/github/ruby.git
Show "-" if indent level is negative
This commit is contained in:
Родитель
90c51ca391
Коммит
76851381cb
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
|
||||||
|
|
Загрузка…
Ссылка в новой задаче