summaryrefslogtreecommitdiff
path: root/examples/trapping_eof.rb
diff options
context:
space:
mode:
Diffstat (limited to 'examples/trapping_eof.rb')
-rw-r--r--examples/trapping_eof.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/trapping_eof.rb b/examples/trapping_eof.rb
index a63188c..41f7003 100644
--- a/examples/trapping_eof.rb
+++ b/examples/trapping_eof.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: utf-8
# trapping_eof.rb
#
@@ -13,7 +14,7 @@ loop do
name = ask("What's your name?")
break if name == "exit"
puts "Hello, #{name}!"
- rescue EOFError # HighLine throws this if @input.eof?
+ rescue EOFError # HighLine throws this if @input.eof?
break
end
end