lib/wookie/dialects/simple.rb in wookie-translator-0.1.0 vs lib/wookie/dialects/simple.rb in wookie-translator-0.1.1
- old
+ new
@@ -15,10 +15,10 @@
's' => 'c', 't' => 'ao', 'u' => 'hu', 'v' => 'ho', 'w' => 'oh', 'x' => 'k',
'y' => 'ro', 'z' => 'uf'
}.freeze
# A short code is defined by a length of 1 of a lookup value.
- SHORT_CODES = LOOKUP.map{|_,v| v if v.length == 1 }.compact.join
+ SHORT_CODES = LOOKUP.map{|_,v| v if v.length == 1 }.compact.sort.join
# Translates an english string to wookiespeack.
#
# @param [String] The string to be translated.
# @return [String] The translation.
\ No newline at end of file