lib/iso639.rb in iso639-1.0.4 vs lib/iso639.rb in iso639-1.0.5

- old
+ new

@@ -39,15 +39,11 @@ File.readlines(iso639_file).each do |line| lang = Language.new *line.split("|") LanguagesByAlpha2[lang.alpha2] = lang if lang.alpha2 LanguagesByAlpha3[lang.alpha3] = lang if lang.alpha3 LanguagesByAlpha3Terminology[lang.alpha3_terminology] = lang if lang.alpha3_terminology - lang.name.split(/;\s*/).each do |name| - LanguagesByName[name] = lang - end - lang.french_name.split(/;\s*/).each do |name| - LanguagesByFrenchName[name] = lang - end + lang.english_names.each { |name| LanguagesByName[name] = lang } + lang.french_names.each { |name| LanguagesByFrenchName[name] = lang } end # Public: Find a language by any common lookup value # # lookup - A String representing an alpha-2, alpha-3, or language name