Releases: ruby/did_you_mean
v1.2.0
This version 1.2.0 only has support for Ruby 2.5.0 and later as it uses new features that are only available in 2.5. All future patch releases under 1.2.* will only be compatible with Ruby 2.5.0 and later as well. Versions earlier than 1.1.* will still be maintained until Ruby 2.4 is deprecated. Any other versions below 1.0 will no longer be maintained.
New features
- The
KeyError
name suggestion feature has been promoted to a stable feature and is available by default (acf5945, https://bugs.ruby-lang.org/issues/12063) - Now suggests
true
,false
ornil
if a NameError occurs because of a typo in these names (#94, @styd) - New Formatter API: This provides a clean way to customize DidYouMean’s formatter without overriding the default formatter. Please refer to the built-in verbose formatter for how to use it
v1.1.2
v1.1.1
v1.0.3
v1.1.0
The version 1.1.0
only has support for Ruby 2.4.0 and later. All patch releases under 1.1.*
will only be compatible with Ruby 2.4.0 and later as well. Versions earlier than 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#[]
orStruct#[]=
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']
-
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)
v1.0.2
This version is only compatible with Ruby 2.3 and later.
Features
- Experimental features are officially available through
require 'did_you_mean/experimental'
Deprecations
require 'did_you_mean/extra_features'
is now deprecated in favor ofrequire 'did_you_mean/experimental'
Internal Changes
- Replaced the
DidYouMean::SpellCheckable
module with theDidYouMean::SpellChecker
class. This is a slower implementation but close to the model explained in this talk, more reusable and possibly makes it easier to expose the class as a public interface.
v1.0.1
This version is only compatible with Ruby 2.3 and later.
Bug Fixes
- Fixed a bug where the gem suggests what is actually typed by the user: 1c52c88
- Fixed features that didn't work on JRuby 9.1.0.0: dc48dde, 4de23f8, 00e3059. The local variable name correction is still disabled. Also see: jruby/jruby#3480
v1.0.0
This version is only compatible with Ruby 2.3 and later.
Features
- Introduced a verbose formatter
- Introduced an easy way to enabling experimental features
Bug Fixes
- Fixed a bug where the Jaro-Winkler implementation returns the wrong distance when 2 identical strings are given. fixes #58
Internal Changes
v1.0.0.rc1
v1.0.0.beta3
Internal Changes
- Use the
frozen-string-literal
pragma rather than calling.freeze
everywhere - Use the
NameError#receiver
method inDidYouMean:: ClassNameChecker
to know the namespace where the constant call is made - Refactored the
SpellCheckerTest