End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
PrettyPrint#fill_breakable
fill_breakable(sep=' ', width=sep.length)
lib/prettyprint.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/prettyprint.rb, line 212
def fill_breakable(sep=' ', width=sep.length)
group { breakable sep, width }
end
This is similar to breakable except the decision to break or not is determined individually.
Two fill_breakable under a group may cause 4 results: (break,break), (break,non-break), (non-break,break), (non-break,non-break). This is different to breakable because two breakable under a group may cause 2 results: (break,break), (non-break,non-break).
The text sep is inserted if a line is not broken at this point.
If sep is not specified, “ ” is used.
If width is not specified, sep.length is used. You will have to specify this when sep is a multibyte character, for example.
See also
#current_group
#flush
#break_outmost_groups
#group
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0