diff --git a/wc.rb b/wc.rb index 21bde5f..afd18d6 100644 --- a/wc.rb +++ b/wc.rb @@ -10,7 +10,8 @@ def parse_options opts.on('-c') { options[:bytes] = true } end.parse! options = { bytes: true, lines: true, words: true } if options.empty? - [options, ARGV.empty? ? ['-'] : ARGV] + sources = ARGV.empty? ? ['-'] : ARGV + [options, sources] end def input_stream_sources(input_sources, options)