1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/ripper/tools/strip.rb

13 lines
219 B
Ruby
Raw Normal View History

# frozen_string_literal: false
last_is_void = false
ARGF.each do |line|
case line
when /\A\s*\z/, /\A\#/
puts unless last_is_void
last_is_void = true
else
print line
last_is_void = false
end
end