iso-639 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/iso-639.gemspec +1 -1
  2. data/lib/iso-639.rb +3 -3
  3. metadata +1 -1
data/iso-639.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "iso-639"
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["William Melody"]
data/lib/iso-639.rb CHANGED
@@ -498,9 +498,9 @@ class ISO_639 < Array
498
498
  self["zza", "", "", "Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki", "zaza; dimili; dimli; kirdki; kirmanjki; zazaki"]
499
499
  ]
500
500
 
501
- # A reverse index generated from the ISO_639_2 data. Used for searching
501
+ # An inverted index generated from the ISO_639_2 data. Used for searching
502
502
  # all words and codes in all fields.
503
- REVERSE_INDEX = lambda {
503
+ INVERTED_INDEX = lambda {
504
504
  index = {}
505
505
  ISO_639_2.each_with_index do |record, i|
506
506
  record.each do |field|
@@ -558,7 +558,7 @@ class ISO_639 < Array
558
558
  # French name field.
559
559
  def search(term)
560
560
  normalized_term = term.downcase.strip
561
- indexes = REVERSE_INDEX[normalized_term]
561
+ indexes = INVERTED_INDEX[normalized_term]
562
562
  indexes ? ISO_639_2.values_at(*indexes).uniq : []
563
563
  end
564
564
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso-639
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: