Method: String#untabify
- Defined in:
- lib/gonzui/util.rb
#untabify ⇒ Object
176 177 178 179 180 181 182 183 184 185 |
# File 'lib/gonzui/util.rb', line 176 def untabify new = "" self.each_line {|line| true while line.gsub!(/\t+/) { ' ' * ($&.length * 8 - $`.length % 8) #`) } new << line } return new end |