summaryrefslogtreecommitdiff
path: root/num_tok
diff options
context:
space:
mode:
Diffstat (limited to 'num_tok')
-rwxr-xr-xnum_tok6
1 files changed, 4 insertions, 2 deletions
diff --git a/num_tok b/num_tok
index a11b0d7..53b99a0 100755
--- a/num_tok
+++ b/num_tok
@@ -1,8 +1,10 @@
#!/usr/bin/env ruby
-STDIN.set_encoding('utf-8')
+STDIN.set_encoding 'utf-8'
+STDOUT.set_encoding 'utf-8'
+
while line = STDIN.gets
- puts line.split.length
+ puts line.strip.split.length
end