# File lib/text/format.rb, line 766 766: def unexpand(to_unexpand = nil) 767: to_unexpand = @text if to_unexpand.nil? 768: 769: tmp = / {#{@tabstop}}/ 770: changer = lambda do |text| 771: res = text.split(NEWLINE_RE) 772: res.collect! { |ln| ln.gsub!(tmp, TAB) } 773: res.join(NEWLINE) 774: end 775: 776: if to_unexpand.kind_of?(Array) 777: to_unexpand.collect { |tu| changer[tu] } 778: else 779: changer[to_unexpand] 780: end 781: end