lib/stringex/unidecoder.rb in stringex-2.0.1 vs lib/stringex/unidecoder.rb in stringex-2.0.2
- old
+ new
@@ -1,11 +1,13 @@
# encoding: UTF-8
+require 'yaml'
+
module Stringex
module Unidecoder
# Contains Unicode codepoints, loading as needed from YAML files
CODEPOINTS = Hash.new{|h, k|
- h[k] = YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), "unidecoder_data", "#{k}.yml"))
+ h[k] = ::YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), "unidecoder_data", "#{k}.yml"))
} unless defined?(CODEPOINTS)
class << self
# Returns string with its UTF-8 characters transliterated to ASCII ones
#