alexrabarts / iso_country_codes

A Ruby library that provides ISO 3166-1 country codes/names and ISO 4217 currencies
http://github.com/alexrabarts/iso-country-codes
163 stars 62 forks source link

NoMethodError: undefined method `to_set' for ["AFGHANISTAN"]:Array #49

Closed eirvandelden closed 4 years ago

eirvandelden commented 6 years ago

What I did:

What I expected: BE

What I got:

❯ irb
2.4.0 :001 > require 'iso_country_codes'
 => true
2.4.0 :002 > IsoCountryCodes.search_by_name('Belgie')
NoMethodError: undefined method `to_set' for ["AFGHANISTAN"]:Array
Did you mean?  to_s
    from /X/.rvm/gems/ruby-2.4.0/gems/iso_country_codes-0.7.8/lib/iso_country_codes/iso_country_codes.rb:94:in `word_set'
    from /X/.rvm/gems/ruby-2.4.0/gems/iso_country_codes-0.7.8/lib/iso_country_codes/iso_country_codes.rb:44:in `block in search_by_name'
    from /X/.rvm/gems/ruby-2.4.0/gems/iso_country_codes-0.7.8/lib/iso_country_codes/iso_country_codes.rb:44:in `select'
    from /X/.rvm/gems/ruby-2.4.0/gems/iso_country_codes-0.7.8/lib/iso_country_codes/iso_country_codes.rb:44:in `search_by_name'
    from (irb):2
    from /X/.rvm/rubies/ruby-2.4.0/bin/irb:11:in `<main>'