did_you_mean v1.1.0 Release Notes

  • ๐Ÿš€ released at 2016-12-19 23:19:06 UTC

    ๐Ÿ’Ž The version 1.1.0 only has support for Ruby 2.4.0 and later. Also, all patch releases under 1.1.* will only be compatible with Ruby 2.4.0 and later as well. Versions under 1.0.* will still be maintained until Ruby 2.3 is deprecated. Any other versions below 1.0 will no longer be maintained.

    ๐Ÿ†• New Features

    • Suggest a method name on a NameError from the Struct#[] or Struct#[]= method (#73):

      Struct.new(:foo).new[:fooo]
      # => NameError: no member 'fooo' in struct
      # Did you mean? foo
      # foo=
      
    • โž• Added a public interface for the gem's spell checker:

      DidYouMean::SpellChecker.new(dictionary: ['email', 'fail', 'eval']).correct('meail')
      # => ['email']
      
    • 0๏ธโƒฃ Methods defined on nil by default are no longer suggested. Note that methods, defined after the gem is loaded, will still be suggested (e.g. ActiveSupport).

    ๐Ÿ› Bug Fixes

    • ๐Ÿ’Ž Fixed a bug where private method names were added to the dictionary when an argument was passed in to a public method. Use the NoMethodError#private_call? method instead (0a1b761)