summaryrefslogtreecommitdiff
path: root/examples/get_character.rb
diff options
context:
space:
mode:
Diffstat (limited to 'examples/get_character.rb')
-rw-r--r--examples/get_character.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/get_character.rb b/examples/get_character.rb
index c0a666f..d94a9b7 100644
--- a/examples/get_character.rb
+++ b/examples/get_character.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: utf-8
require "rubygems"
require "highline/import"
@@ -8,8 +9,8 @@ puts
choices = "ynaq"
answer = ask("Your choice [#{choices}]? ") do |q|
- q.echo = false
- q.character = true
- q.validate = /\A[#{choices}]\Z/
- end
+ q.echo = false
+ q.character = true
+ q.validate = /\A[#{choices}]\Z/
+end
say("Your choice: #{answer}")