https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-11-03T18:02:15ZRuby Issue Tracking SystemRuby master - Feature #5552: Array#ljust, Array#rjusthttps://redmine.ruby-lang.org/issues/5552?journal_id=218502011-11-03T18:02:15Zsawa (Tsuyoshi Sawada)
<ul></ul><p>And also <code>Array#center</code> analogous to <code>String#center</code> as well.</p> Ruby master - Feature #5552: Array#ljust, Array#rjusthttps://redmine.ruby-lang.org/issues/5552?journal_id=218532011-11-03T19:36:57Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>なぜそれが必要なのか提案に含めてください。Stringにあるから、では不十分です。<br>
私にはArray#ljustなどがあって嬉しい局面が想像できません。</p> Ruby master - Feature #5552: Array#ljust, Array#rjusthttps://redmine.ruby-lang.org/issues/5552?journal_id=219122011-11-06T17:02:43Ztrans (Thomas Sawyer)
<ul></ul><p>If you know pad length is greater than the array length then:</p>
<p>[:a,:b,:c].insert(5, nil)</p>
<p>Not sure about "rjust" though. I suppose there is always:</p>
<p>a.unshift(nil) until a.size == 5</p>
<p>Though that seems fairly inefficient.</p> Ruby master - Feature #5552: Array#ljust, Array#rjusthttps://redmine.ruby-lang.org/issues/5552?journal_id=318102012-10-27T23:55:46Zyhara (Yutaka HARA)
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Rejected</i></li></ul><p>Hi,</p>
<p>I'm closing this ticket because of no feedback.<br>
Please reopen if you still need these methods.</p>