did_you_mean 1.3.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +39 -0
- data/CHANGELOG.md +187 -62
- data/Gemfile +2 -0
- data/README.md +40 -36
- data/Rakefile +38 -12
- data/appveyor.yml +25 -0
- data/benchmark/jaro_winkler/memory_usage.rb +4 -4
- data/benchmark/jaro_winkler/speed.rb +14 -6
- data/benchmark/levenshtein/memory_usage.rb +4 -4
- data/benchmark/levenshtein/speed.rb +13 -8
- data/benchmark/require_path_checker.rb +47 -0
- data/benchmark/speed.yml +13 -0
- data/did_you_mean.gemspec +6 -4
- data/{doc → documentation}/CHANGELOG.md.erb +0 -0
- data/{doc → documentation}/changelog_generator.rb +1 -1
- data/documentation/human_typo_api.md +20 -0
- data/documentation/tree_spell_algorithm.md +82 -0
- data/documentation/tree_spell_checker_api.md +24 -0
- data/lib/did_you_mean/core_ext/name_error.rb +11 -6
- data/lib/did_you_mean/experimental.rb +2 -2
- data/lib/did_you_mean/formatter.rb +44 -0
- data/lib/did_you_mean/formatters/plain_formatter.rb +3 -32
- data/lib/did_you_mean/formatters/verbose_formatter.rb +6 -46
- data/lib/did_you_mean/levenshtein.rb +1 -1
- data/lib/did_you_mean/spell_checker.rb +13 -19
- data/lib/did_you_mean/spell_checkers/key_error_checker.rb +8 -2
- data/lib/did_you_mean/spell_checkers/method_name_checker.rb +23 -7
- data/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +5 -5
- data/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +4 -1
- data/lib/did_you_mean/spell_checkers/name_error_checkers.rb +2 -2
- data/lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb +20 -0
- data/lib/did_you_mean/spell_checkers/require_path_checker.rb +39 -0
- data/lib/did_you_mean/tree_spell_checker.rb +109 -0
- data/lib/did_you_mean/verbose.rb +2 -4
- data/lib/did_you_mean/version.rb +1 -1
- data/lib/did_you_mean.rb +68 -22
- data/test/core_ext/test_name_error_extension.rb +49 -0
- data/test/edit_distance/{jaro_winkler_test.rb → test_jaro_winkler.rb} +2 -2
- data/test/fixtures/book.rb +1 -1
- data/test/fixtures/mini_dir.yml +15 -0
- data/test/fixtures/rspec_dir.yml +112 -0
- data/test/helper.rb +33 -0
- data/test/spell_checking/{class_name_check_test.rb → test_class_name_check.rb} +15 -11
- data/test/spell_checking/{key_name_check_test.rb → test_key_name_check.rb} +18 -8
- data/test/spell_checking/{method_name_check_test.rb → test_method_name_check.rb} +35 -14
- data/test/spell_checking/test_pattern_key_name_check.rb +20 -0
- data/test/spell_checking/test_require_path_check.rb +32 -0
- data/test/spell_checking/test_uncorrectable_name_check.rb +15 -0
- data/test/spell_checking/{variable_name_check_test.rb → test_variable_name_check.rb} +23 -19
- data/test/test_ractor_compatibility.rb +102 -0
- data/test/{spell_checker_test.rb → test_spell_checker.rb} +3 -2
- data/test/test_tree_spell_checker.rb +170 -0
- data/test/tree_spell/change_word.rb +61 -0
- data/test/tree_spell/human_typo.rb +69 -0
- data/test/tree_spell/test_change_word.rb +38 -0
- data/test/tree_spell/test_explore.rb +128 -0
- data/test/tree_spell/test_human_typo.rb +24 -0
- metadata +60 -67
- data/.ruby-version +0 -1
- data/.travis.yml +0 -15
- data/lib/did_you_mean/experimental/initializer_name_correction.rb +0 -20
- data/lib/did_you_mean/experimental/ivar_name_correction.rb +0 -74
- data/test/core_ext/name_error_extension_test.rb +0 -51
- data/test/experimental/initializer_name_correction_test.rb +0 -15
- data/test/experimental/method_name_checker_test.rb +0 -13
- data/test/spell_checking/uncorrectable_name_check_test.rb +0 -15
- data/test/test_helper.rb +0 -13
- data/test/verbose_formatter_test.rb +0 -23
- data/tmp/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5179422bf1ff107c7189cb5e75e44f1cd8d44c2e305cbd46f1c262011fe46add
|
4
|
+
data.tar.gz: ea8103ee404f2bed7e002efb615b9a1c26b8080284fac57929276b72fa5cb0c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45ee6a7e79a463743a5529f38b503c78266458b07fe2e8a85d8f4e0ece2c65dbc40baf0aaa96c4c6592bca868c4a99f9d6001f4b5b9c033bf504aedb34ba5340
|
7
|
+
data.tar.gz: f259d9fef544f4071733007277c672c16f95bbe0e7d303bc6bf52fa0d7fa7108dcf615d6502e7950d2b48e4ce720034cc2d23096d52bee6f03e7206eab02569b
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- 'master'
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- 'master'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby: [ '2.5', '2.6', '2.7', '3.0', 'ruby-head', 'jruby-9.2', 'jruby-head' ]
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v1
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
- name: Build and test with Rake
|
23
|
+
run: |
|
24
|
+
gem i test-unit
|
25
|
+
RUBYOPT='--disable-did_you_mean' rake
|
26
|
+
|
27
|
+
benchmark:
|
28
|
+
runs-on: ubuntu-latest
|
29
|
+
steps:
|
30
|
+
- uses: actions/checkout@v1
|
31
|
+
- uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: 2.7.1
|
34
|
+
- name: Test performance and accuracy
|
35
|
+
run: |
|
36
|
+
gem install bundler
|
37
|
+
bundle install --jobs 4 --retry 2
|
38
|
+
RUBYOPT='--disable-did_you_mean' bundle exec rake test:accuracy
|
39
|
+
RUBYOPT='--disable-did_you_mean' bundle exec rake benchmark:memory
|
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,124 @@
|
|
1
|
-
##
|
1
|
+
## v1.6.1
|
2
|
+
|
3
|
+
_<sup>released at 2020-12-22 13:22:35 UTC</sup>_
|
4
|
+
|
5
|
+
#### Deprecations
|
6
|
+
|
7
|
+
- Deprecate custom formatters to reduce complexity for Ractor support.
|
8
|
+
- Deprecate access to the `DidYouMean::SPELL_CHECEKRS` constant for Ractor support.
|
9
|
+
|
10
|
+
#### Features
|
11
|
+
|
12
|
+
- The `did_you_mean` gem is now Ractor-compatible (`8faba54b`)
|
13
|
+
- Suggest keys on NoMatchingPatternKeyError (#159, @k-tsj)
|
14
|
+
- Make the same name check case-sensitive (#164, @pocke)
|
15
|
+
|
16
|
+
Before:
|
17
|
+
```ruby
|
18
|
+
DidYouMean::SpellChecker.new(dictionary: ['Method', 'MEthod']).correct("MEthod")
|
19
|
+
# => ['Method', 'method']
|
20
|
+
```
|
21
|
+
|
22
|
+
After:
|
23
|
+
```ruby
|
24
|
+
DidYouMean::SpellChecker.new(dictionary: ['Method', 'MEthod']).correct("MEthod")
|
25
|
+
# => ['Method']
|
26
|
+
```
|
27
|
+
|
28
|
+
## v1.6.0 (yanked)
|
29
|
+
|
30
|
+
_This version has been yanked due to significant and unexpected breaking changes._
|
31
|
+
|
32
|
+
## [v1.5.0](https://github.com/ruby/did_you_mean/tree/v1.5.0)
|
33
|
+
|
34
|
+
_<sup>released at 2020-12-22 05:47:21 UTC</sup>_
|
35
|
+
|
36
|
+
#### Features
|
37
|
+
|
38
|
+
- Suggest require paths on LoadError ([#143](https://github.com/ruby/did_you_mean/pull/143))
|
39
|
+
|
40
|
+
## [v1.4.0](https://github.com/ruby/did_you_mean/tree/v1.4.0)
|
41
|
+
|
42
|
+
_<sup>released at 2020-05-09 02:56:43 UTC</sup>_
|
43
|
+
|
44
|
+
As of Ruby 2.7, the `did_you_mean` gem has been promoted up to a default gem. I would like to thank [@kddeisz](https://github.com/kddeisz) for his hard work on making the entire gem easily portable the main ruby/ruby repo ([#132](https://github.com/ruby/did_you_mean/pull/132), [#131](https://github.com/ruby/did_you_mean/pull/131), and [ruby/ruby#2631](https://github.com/ruby/ruby/pull/2631)).
|
45
|
+
|
46
|
+
#### Features
|
47
|
+
|
48
|
+
- Add a new tree spell checker ([#119](https://github.com/ruby/did_you_mean/pull/119), [@obromios](https://github.com/obromios))
|
49
|
+
- Add a public API for registering an error ([#123](https://github.com/ruby/did_you_mean/pull/123), [@kddeisz](https://github.com/kddeisz))
|
50
|
+
|
51
|
+
#### Bug fixes
|
52
|
+
|
53
|
+
- Fixes a bug where wrong suggestion could be made when string requested on hash and keys are symbols ([@localhostdotdev](https://github.com/localhostdotdev), [#134](https://github.com/ruby/did_you_mean/pull/134))
|
54
|
+
|
55
|
+
#### Breaking changes
|
56
|
+
|
57
|
+
- Experimental features have been removed ([#135](https://github.com/ruby/did_you_mean/pull/135))
|
58
|
+
|
59
|
+
#### Internal changes
|
60
|
+
|
61
|
+
- Replace Travis CI with GitHub Actions ([#124](https://github.com/ruby/did_you_mean/pull/124))
|
62
|
+
- Drop mintiest dependency ([#129](https://github.com/ruby/did_you_mean/pull/129))
|
63
|
+
- Drop delegate dependency ([#138](https://github.com/ruby/did_you_mean/pull/138))
|
64
|
+
|
65
|
+
## [v1.3.1](https://github.com/ruby/did_you_mean/tree/v1.3.1)
|
66
|
+
|
67
|
+
_<sup>released at 2019-09-29 03:58:46 UTC</sup>_
|
68
|
+
|
69
|
+
#### Bug fixes
|
70
|
+
|
71
|
+
- Fixes a test failure in Ruby core where DYM attempts to mutate immutable strings from `Symbol#to_s` ([#125](https://github.com/ruby/did_you_mean/pull/125), [@nobu](https://github.com/nobu), [@eregon](https://github.com/eregon), [@MSP-Greg](https://github.com/MSP-Greg))
|
72
|
+
- Removes the empty `tmp/` directory to comply with `rpmlint` ([#122](https://github.com/ruby/did_you_mean/issues/122), [@pvalena](https://github.com/pvalena))
|
73
|
+
- Fixes a bug where suggestions are not shown on subsequent errors ([#120](https://github.com/ruby/did_you_mean/issues/120), [@localhostdotdev](https://github.com/localhostdotdev))
|
74
|
+
|
75
|
+
## [v1.3.0](https://github.com/ruby/did_you_mean/tree/v1.3.0)
|
76
|
+
|
77
|
+
_<sup>released at 2018-12-18 15:37:10 UTC</sup>_
|
78
|
+
|
79
|
+
**Starting version 1.3, the `did_you_mean` gem will be compatible with 2.6 and 2.5, and we will try to keep all subsequent versions compatible with Ruby 2.5 on an best-effort basis.**
|
80
|
+
|
81
|
+
- 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.
|
82
|
+
- Versions earlier than 1.1.\* will still be maintained until Ruby 2.4 is deprecated.
|
83
|
+
- Versions earlier than 1.0.\* is still maintained, but are likely to be deprecated as Ruby 2.3 will (probably) be deprecated in 2019.
|
84
|
+
- Support for versions below 1.0 has already ended.
|
85
|
+
|
86
|
+
#### New features
|
87
|
+
|
88
|
+
- Suggest reserved words if there are close matches ([<tt>2a082a7</tt>](https://github.com/ruby/did_you_mean/commit/2a082a71991f5afe2e27ce9538103eac4c428025))
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
results = yiedl
|
92
|
+
# NameError => undefined local variable or method `yiedl' for ...
|
93
|
+
# Did you mean? yield
|
94
|
+
```
|
95
|
+
|
96
|
+
#### Bug fixes
|
97
|
+
|
98
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
99
|
+
|
100
|
+
## [v1.2.2](https://github.com/ruby/did_you_mean/tree/v1.2.2)
|
101
|
+
|
102
|
+
_<sup>released at 2019-03-09 23:17:22 UTC</sup>_
|
103
|
+
|
104
|
+
#### Bug fixes
|
105
|
+
|
106
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
107
|
+
|
108
|
+
## [v1.2.1](https://github.com/ruby/did_you_mean/tree/v1.2.1)
|
2
109
|
|
3
110
|
_<sup>released at 2018-04-03 04:44:47 UTC</sup>_
|
4
111
|
|
5
112
|
#### Bug Fixes
|
6
113
|
|
7
|
-
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/
|
8
|
-
- Fixed a bug where the deprecated `DidYouMean::Formatter` has been removed unexpectedly ([#103](https://github.com/
|
114
|
+
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/ruby/did_you_mean/issues/102), [@schneems](https://github.com/schneems))
|
115
|
+
- Fixed a bug where the deprecated `DidYouMean::Formatter` has been removed unexpectedly ([#103](https://github.com/ruby/did_you_mean/issues/103), [<tt>4b5ba32</tt>](https://github.com/ruby/did_you_mean/commit/4b5ba3215975df1dd8e9c7eacffcf02abfffa92e))
|
9
116
|
|
10
117
|
#### Other Changes
|
11
118
|
|
12
|
-
- Non-production code that has a non-commercial
|
119
|
+
- Non-production code that has a non-commercial license has been removed from gem releases ([#105](https://github.com/ruby/did_you_mean/issues/105), [@jbotelho2-bb](https://github.com/jbotelho2-bb))
|
13
120
|
|
14
|
-
## [v1.2.0](https://github.com/
|
121
|
+
## [v1.2.0](https://github.com/ruby/did_you_mean/tree/v1.2.0)
|
15
122
|
|
16
123
|
_<sup>released at 2018-01-02 20:49:35 UTC</sup>_
|
17
124
|
|
@@ -19,11 +126,20 @@ _<sup>released at 2018-01-02 20:49:35 UTC</sup>_
|
|
19
126
|
|
20
127
|
#### New features
|
21
128
|
|
22
|
-
- The `KeyError` name suggestion feature has been promoted to a stable feature and is available by default ([<tt>acf5945</tt>](https://github.com/
|
23
|
-
- Now suggests `true`, `false` or `nil` if a NameError occurs because of a typo in these names ([#94](https://github.com/
|
24
|
-
- 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](https://github.com/
|
129
|
+
- The `KeyError` name suggestion feature has been promoted to a stable feature and is available by default ([<tt>acf5945</tt>](https://github.com/ruby/did_you_mean/commit/acf59450dfb67eefae9b465ccc8029af46ae7dd0), [https://bugs.ruby-lang.org/issues/12063](https://bugs.ruby-lang.org/issues/12063))
|
130
|
+
- Now suggests `true`, `false` or `nil` if a NameError occurs because of a typo in these names ([#94](https://github.com/ruby/did_you_mean/pull/94), [@styd](https://github.com/styd))
|
131
|
+
- 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](https://github.com/ruby/did_you_mean/blob/671cdff/lib/did_you_mean/verbose.rb) for how to use it
|
132
|
+
|
133
|
+
## [v1.1.3](https://github.com/ruby/did_you_mean/tree/v1.1.3)
|
25
134
|
|
26
|
-
|
135
|
+
_<sup>released at 2019-03-09 23:16:54 UTC</sup>_
|
136
|
+
|
137
|
+
#### Bug fixes
|
138
|
+
|
139
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
140
|
+
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/ruby/did_you_mean/issues/102), [@schneems](https://github.com/schneems))
|
141
|
+
|
142
|
+
## [v1.1.2](https://github.com/ruby/did_you_mean/tree/v1.1.2)
|
27
143
|
|
28
144
|
_<sup>released at 2017-09-24 07:28:48 UTC</sup>_
|
29
145
|
|
@@ -31,15 +147,15 @@ _<sup>released at 2017-09-24 07:28:48 UTC</sup>_
|
|
31
147
|
|
32
148
|
#### Bug Fixes
|
33
149
|
|
34
|
-
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/
|
150
|
+
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/ruby/did_you_mean/pull/84), [<tt>c2e4008</tt>](https://github.com/ruby/did_you_mean/commit/c2e40083cef604c00ccd10efc6d7a5036ad9eb5b))
|
35
151
|
|
36
|
-
## [v1.1.1](https://github.com/
|
152
|
+
## [v1.1.1](https://github.com/ruby/did_you_mean/tree/v1.1.1)
|
37
153
|
|
38
154
|
_<sup>released at 2017-09-24 07:24:02 UTC</sup>_
|
39
155
|
|
40
156
|
### This version has been yanked from Rubygems.org and is not available.
|
41
157
|
|
42
|
-
## [v1.1.0](https://github.com/
|
158
|
+
## [v1.1.0](https://github.com/ruby/did_you_mean/tree/v1.1.0)
|
43
159
|
|
44
160
|
_<sup>released at 2016-12-19 23:19:06 UTC</sup>_
|
45
161
|
|
@@ -47,7 +163,7 @@ The version `1.1.0` only has support for Ruby 2.4.0 and later. Also, all patch r
|
|
47
163
|
|
48
164
|
#### New Features
|
49
165
|
|
50
|
-
- Suggest a method name on a NameError from the `Struct#[]` or `Struct#[]=` method ([#73](https://github.com/
|
166
|
+
- Suggest a method name on a NameError from the `Struct#[]` or `Struct#[]=` method ([#73](https://github.com/ruby/did_you_mean/pull/73)):
|
51
167
|
|
52
168
|
```ruby
|
53
169
|
Struct.new(:foo).new[:fooo]
|
@@ -67,9 +183,18 @@ The version `1.1.0` only has support for Ruby 2.4.0 and later. Also, all patch r
|
|
67
183
|
|
68
184
|
#### Bug Fixes
|
69
185
|
|
70
|
-
- 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 ([<tt>0a1b761</tt>](https://github.com/
|
186
|
+
- 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 ([<tt>0a1b761</tt>](https://github.com/ruby/did_you_mean/commit/0a1b7612252055e583a373b473932f789381ca0f))
|
187
|
+
|
188
|
+
## [v1.0.4](https://github.com/ruby/did_you_mean/tree/v1.0.4)
|
189
|
+
|
190
|
+
_<sup>released at 2019-03-09 23:16:38 UTC</sup>_
|
191
|
+
|
192
|
+
#### Bug fixes
|
193
|
+
|
194
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
195
|
+
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/ruby/did_you_mean/issues/102), [@schneems](https://github.com/schneems))
|
71
196
|
|
72
|
-
## [v1.0.3](https://github.com/
|
197
|
+
## [v1.0.3](https://github.com/ruby/did_you_mean/tree/v1.0.3)
|
73
198
|
|
74
199
|
_<sup>released at 2017-09-24 07:22:07 UTC</sup>_
|
75
200
|
|
@@ -77,9 +202,9 @@ _<sup>released at 2017-09-24 07:22:07 UTC</sup>_
|
|
77
202
|
|
78
203
|
#### Bug Fixes
|
79
204
|
|
80
|
-
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/
|
205
|
+
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/ruby/did_you_mean/pull/84), [<tt>c2e4008</tt>](https://github.com/ruby/did_you_mean/commit/c2e40083cef604c00ccd10efc6d7a5036ad9eb5b))
|
81
206
|
|
82
|
-
## [v1.0.2](https://github.com/
|
207
|
+
## [v1.0.2](https://github.com/ruby/did_you_mean/tree/v1.0.2)
|
83
208
|
|
84
209
|
_<sup>released at 2016-11-20 18:03:07 UTC</sup>_
|
85
210
|
|
@@ -97,41 +222,41 @@ _<sup>released at 2016-11-20 18:03:07 UTC</sup>_
|
|
97
222
|
|
98
223
|
- Replaced the `DidYouMean::SpellCheckable` module with the `DidYouMean::SpellChecker` class. This is a slower implementation but close to the model explained in [this talk](https://speakerdeck.com/yuki24/saving-people-from-typos), more reusable and possibly makes it easier to expose the class as a public interface.
|
99
224
|
|
100
|
-
## [v1.0.1](https://github.com/
|
225
|
+
## [v1.0.1](https://github.com/ruby/did_you_mean/tree/v1.0.1)
|
101
226
|
|
102
227
|
_<sup>released at 2016-05-15 05:17:22 UTC</sup>_
|
103
228
|
|
104
229
|
#### Bug Fixes
|
105
230
|
|
106
|
-
- Fixed a bug where the gem suggests what is actually typed by the user: [<tt>1c52c88</tt>](https://github.com/
|
107
|
-
- Fixed features that didn't work on JRuby 9.1.0.0: [<tt>dc48dde</tt>](https://github.com/
|
231
|
+
- Fixed a bug where the gem suggests what is actually typed by the user: [<tt>1c52c88</tt>](https://github.com/ruby/did_you_mean/commit/1c52c887c62b0921e799f94bcc4a846dc7cbc057)
|
232
|
+
- Fixed features that didn't work on JRuby 9.1.0.0: [<tt>dc48dde</tt>](https://github.com/ruby/did_you_mean/commit/dc48dde1b2a8f05aab1fcf897e1cb3075a206f53), [<tt>4de23f8</tt>](https://github.com/ruby/did_you_mean/commit/4de23f880502c80c5f321371d39c08bb0fa34040), [<tt>00e3059</tt>](https://github.com/ruby/did_you_mean/commit/00e305971060d150fae4817b5e895d6478b37579). The local variable name correction is still disabled. Also see: [jruby/jruby#3480](https://github.com/jruby/jruby/issues/3480)
|
108
233
|
|
109
|
-
## [v1.0.0](https://github.com/
|
234
|
+
## [v1.0.0](https://github.com/ruby/did_you_mean/tree/v1.0.0)
|
110
235
|
|
111
236
|
_<sup>released at 2015-12-25 05:13:04 UTC</sup>_
|
112
237
|
|
113
238
|
#### Features
|
114
239
|
|
115
|
-
- Introduced a [verbose formatter](https://github.com/
|
116
|
-
- Introduced an easy way to enabling [experimental features](https://github.com/
|
240
|
+
- Introduced a [verbose formatter](https://github.com/ruby/did_you_mean#verbose-formatter)
|
241
|
+
- Introduced an easy way to enabling [experimental features](https://github.com/ruby/did_you_mean#experimental-features)
|
117
242
|
|
118
243
|
#### Bug Fixes
|
119
244
|
|
120
|
-
- Fixed a bug where the Jaro-Winkler implementation returns the wrong distance when 2 identical strings are given. fixes [#58](https://github.com/
|
245
|
+
- Fixed a bug where the Jaro-Winkler implementation returns the wrong distance when 2 identical strings are given. fixes [#58](https://github.com/ruby/did_you_mean/pull/58)
|
121
246
|
|
122
247
|
#### Internal Changes
|
123
248
|
|
124
|
-
- Slightly changed the spell checking algorithm. Take a look at [<tt>e2f5b24</tt>](https://github.com/
|
249
|
+
- Slightly changed the spell checking algorithm. Take a look at [<tt>e2f5b24</tt>](https://github.com/ruby/did_you_mean/commit/e2f5b2437f967565e4830eab6077f73ae166e0a7) for more details. fixes [#60](https://github.com/ruby/did_you_mean/issues/60)
|
125
250
|
|
126
|
-
## [v1.0.0.rc1](https://github.com/
|
251
|
+
## [v1.0.0.rc1](https://github.com/ruby/did_you_mean/tree/v1.0.0.rc1)
|
127
252
|
|
128
253
|
_<sup>released at 2015-12-25 05:02:25 UTC</sup>_
|
129
254
|
|
130
255
|
#### Internal Changes
|
131
256
|
|
132
|
-
- No longer uses `TracePoint` API by default. fixes [#55](https://github.com/
|
257
|
+
- No longer uses `TracePoint` API by default. fixes [#55](https://github.com/ruby/did_you_mean/issues/55) and [#56](https://github.com/ruby/did_you_mean/issues/56)
|
133
258
|
|
134
|
-
## [v1.0.0.beta3](https://github.com/
|
259
|
+
## [v1.0.0.beta3](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta3)
|
135
260
|
|
136
261
|
_<sup>released at 2015-12-25 04:56:13 UTC</sup>_
|
137
262
|
|
@@ -141,7 +266,7 @@ _<sup>released at 2015-12-25 04:56:13 UTC</sup>_
|
|
141
266
|
- Use the `NameError#receiver` method in `DidYouMean:: ClassNameChecker` to know the namespace where the constant call is made
|
142
267
|
- Refactored the `SpellCheckerTest`
|
143
268
|
|
144
|
-
## [v1.0.0.beta2](https://github.com/
|
269
|
+
## [v1.0.0.beta2](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta2)
|
145
270
|
|
146
271
|
_<sup>released at 2015-12-25 04:50:36 UTC</sup>_
|
147
272
|
|
@@ -149,7 +274,7 @@ _<sup>released at 2015-12-25 04:50:36 UTC</sup>_
|
|
149
274
|
|
150
275
|
- Fixed a bug where the gem doesn't install properly on Ruby 2.3.0dev
|
151
276
|
|
152
|
-
## [v1.0.0.beta1](https://github.com/
|
277
|
+
## [v1.0.0.beta1](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta1)
|
153
278
|
|
154
279
|
_<sup>released at 2015-12-25 05:27:53 UTC</sup>_
|
155
280
|
|
@@ -163,7 +288,7 @@ _<sup>released at 2015-12-25 05:27:53 UTC</sup>_
|
|
163
288
|
- The interception gem has been removed from the dependencies
|
164
289
|
- Removed code that was needed to support multiple Ruby implementations
|
165
290
|
|
166
|
-
## [v0.10.0](https://github.com/
|
291
|
+
## [v0.10.0](https://github.com/ruby/did_you_mean/tree/v0.10.0)
|
167
292
|
|
168
293
|
_<sup>released at 2015-08-21 06:44:11 UTC</sup>_
|
169
294
|
|
@@ -181,28 +306,28 @@ _<sup>released at 2015-08-21 06:44:11 UTC</sup>_
|
|
181
306
|
```
|
182
307
|
|
183
308
|
- Support for JRuby 9.0.0.0
|
184
|
-
- Prefix-based correction ( [@tjohn](https://github.com/tjohn), [#50](https://github.com/
|
309
|
+
- Prefix-based correction ( [@tjohn](https://github.com/tjohn), [#50](https://github.com/ruby/did_you_mean/issues/50 "Match start of method name"), [#49](https://github.com/ruby/did_you_mean/issues/49 "Use Jaro distance instead of Jaro-Winkler distance"))
|
185
310
|
- Correction search is about 75% faster than 0.9.10
|
186
311
|
|
187
312
|
#### Breaking Changes
|
188
313
|
|
189
314
|
- The ActiveRecord integration has been removed
|
190
315
|
|
191
|
-
## [v0.9.10](https://github.com/
|
316
|
+
## [v0.9.10](https://github.com/ruby/did_you_mean/tree/v0.9.10)
|
192
317
|
|
193
318
|
_<sup>released at 2015-05-14 03:04:47 UTC</sup>_
|
194
319
|
|
195
320
|
#### Bug Fixes
|
196
321
|
|
197
|
-
- Fixed a bug where a duplicate "did you mean?" message was appended each time `#to_s` is called ( [@danfinnie](https://github.com/danfinnie), [#51](https://github.com/
|
322
|
+
- Fixed a bug where a duplicate "did you mean?" message was appended each time `#to_s` is called ( [@danfinnie](https://github.com/danfinnie), [#51](https://github.com/ruby/did_you_mean/issues/51 "Duplicate output for constants in separate gem"))
|
198
323
|
|
199
|
-
## [v0.9.9](https://github.com/
|
324
|
+
## [v0.9.9](https://github.com/ruby/did_you_mean/tree/v0.9.9)
|
200
325
|
|
201
326
|
_<sup>released at 2015-05-13 03:48:19 UTC</sup>_
|
202
327
|
|
203
328
|
#### Features
|
204
329
|
|
205
|
-
- Order word suggestions based on Levenshtein distance ( [@tleish](https://github.com/tleish), [#31](https://github.com/
|
330
|
+
- Order word suggestions based on Levenshtein distance ( [@tleish](https://github.com/tleish), [#31](https://github.com/ruby/did_you_mean/pull/31))
|
206
331
|
|
207
332
|
#### Internal Changes
|
208
333
|
|
@@ -210,7 +335,7 @@ _<sup>released at 2015-05-13 03:48:19 UTC</sup>_
|
|
210
335
|
- Speed up Levenshtein distance calculation by about 40%
|
211
336
|
- The Java extension has been replaced with a pure JRuby implementation
|
212
337
|
|
213
|
-
## [v0.9.8](https://github.com/
|
338
|
+
## [v0.9.8](https://github.com/ruby/did_you_mean/tree/v0.9.8)
|
214
339
|
|
215
340
|
_<sup>released at 2015-04-12 01:55:27 UTC</sup>_
|
216
341
|
|
@@ -218,7 +343,7 @@ _<sup>released at 2015-04-12 01:55:27 UTC</sup>_
|
|
218
343
|
|
219
344
|
- Speed up Levenshtein by 50% and reduce 97% of memory usage
|
220
345
|
|
221
|
-
## [v0.9.7](https://github.com/
|
346
|
+
## [v0.9.7](https://github.com/ruby/did_you_mean/tree/v0.9.7)
|
222
347
|
|
223
348
|
_<sup>released at 2015-04-02 04:20:26 UTC</sup>_
|
224
349
|
|
@@ -226,23 +351,23 @@ _<sup>released at 2015-04-02 04:20:26 UTC</sup>_
|
|
226
351
|
|
227
352
|
- Fixed an issue where _did\_you\_mean_ doesn't install on JRuby properly.
|
228
353
|
|
229
|
-
## [v0.9.6](https://github.com/
|
354
|
+
## [v0.9.6](https://github.com/ruby/did_you_mean/tree/v0.9.6)
|
230
355
|
|
231
356
|
_<sup>released at 2015-01-24 23:19:27 UTC</sup>_
|
232
357
|
|
233
358
|
#### Bug Fixes
|
234
359
|
|
235
|
-
- Fixed a bug where did\_you\_mean incorrectly suggests protected methods when it just isn't callable ( [@glittershark](https://github.com/glittershark), [#34](https://github.com/
|
360
|
+
- Fixed a bug where did\_you\_mean incorrectly suggests protected methods when it just isn't callable ( [@glittershark](https://github.com/glittershark), [#34](https://github.com/ruby/did_you_mean/issues/34 "Did\_you\_mean incorrectly called when attempting to call protected/private method"))
|
236
361
|
|
237
|
-
## [v0.9.5](https://github.com/
|
362
|
+
## [v0.9.5](https://github.com/ruby/did_you_mean/tree/v0.9.5)
|
238
363
|
|
239
364
|
_<sup>released at 2015-01-07 12:41:23 UTC</sup>_
|
240
365
|
|
241
366
|
#### Bug Fixes
|
242
367
|
|
243
|
-
- Whitelist `#safe_constantize` method from `ActiveSupport::Inflector` to avoid significant performance slowdown ( [@tleish](https://github.com/tleish), [#19](https://github.com/
|
368
|
+
- Whitelist `#safe_constantize` method from `ActiveSupport::Inflector` to avoid significant performance slowdown ( [@tleish](https://github.com/tleish), [#19](https://github.com/ruby/did_you_mean/issues/19 "Significant Slowdown when Using Debugger"), [#20](https://github.com/ruby/did_you_mean/pull/20 "Whitelisting safe\_constantize (ActiveSupport::Inflector) method"))
|
244
369
|
|
245
|
-
## [v0.9.4](https://github.com/
|
370
|
+
## [v0.9.4](https://github.com/ruby/did_you_mean/tree/v0.9.4)
|
246
371
|
|
247
372
|
_<sup>released at 2014-11-19 20:00:00 UTC</sup>_
|
248
373
|
|
@@ -250,7 +375,7 @@ _<sup>released at 2014-11-19 20:00:00 UTC</sup>_
|
|
250
375
|
|
251
376
|
- Fixed a bug where no suggestions will be made on JRuby
|
252
377
|
|
253
|
-
## [v0.9.3](https://github.com/
|
378
|
+
## [v0.9.3](https://github.com/ruby/did_you_mean/tree/v0.9.3)
|
254
379
|
|
255
380
|
_<sup>released at 2014-11-18 03:50:11 UTC</sup>_
|
256
381
|
|
@@ -260,15 +385,15 @@ _<sup>released at 2014-11-18 03:50:11 UTC</sup>_
|
|
260
385
|
|
261
386
|
- Replaced the crazy C extension with a so much better one (thanks to [@nobu](https://github.com/nobu)!)
|
262
387
|
|
263
|
-
## [v0.9.2](https://github.com/
|
388
|
+
## [v0.9.2](https://github.com/ruby/did_you_mean/tree/v0.9.2)
|
264
389
|
|
265
390
|
_<sup>released at 2014-11-17 15:32:33 UTC</sup>_
|
266
391
|
|
267
392
|
#### Bug Fixes
|
268
393
|
|
269
|
-
- Fixed a bug where did\_you\_mean doesn't compile on Ruby 2.1.2/2.1.5 ( [#16](https://github.com/
|
394
|
+
- Fixed a bug where did\_you\_mean doesn't compile on Ruby 2.1.2/2.1.5 ( [#16](https://github.com/ruby/did_you_mean/issues/16 "Gem building failed on Debian 6.0.10 x86\_64"))
|
270
395
|
|
271
|
-
## [v0.9.1](https://github.com/
|
396
|
+
## [v0.9.1](https://github.com/ruby/did_you_mean/tree/v0.9.1)
|
272
397
|
|
273
398
|
_<sup>released at 2014-11-16 18:54:24 UTC</sup>_
|
274
399
|
|
@@ -277,15 +402,15 @@ _<sup>released at 2014-11-16 18:54:24 UTC</sup>_
|
|
277
402
|
#### Internal Changes
|
278
403
|
|
279
404
|
- Shrink the gem size by removing unneeded ruby header files.
|
280
|
-
- Now it forces everyone to upgrade the gem when they upgrade Ruby to a new version. This avoids introducing a bug like [#14](https://github.com/
|
405
|
+
- Now it forces everyone to upgrade the gem when they upgrade Ruby to a new version. This avoids introducing a bug like [#14](https://github.com/ruby/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem").
|
281
406
|
|
282
|
-
## [v0.9.0](https://github.com/
|
407
|
+
## [v0.9.0](https://github.com/ruby/did_you_mean/tree/v0.9.0)
|
283
408
|
|
284
409
|
_<sup>released at 2014-11-09 01:26:31 UTC</sup>_
|
285
410
|
|
286
411
|
#### Features
|
287
412
|
|
288
|
-
- did\_you\_mean now suggests instance variable names if `@` is missing ( [#12](https://github.com/
|
413
|
+
- did\_you\_mean now suggests instance variable names if `@` is missing ( [#12](https://github.com/ruby/did_you_mean/issues/12 "Suggest instance- and class-vars"), [<tt>39d1e2b</tt>](https://github.com/ruby/did_you_mean/commit/39d1e2bd66d6ff8acbc4dd5da922fc7e5fcefb20))
|
289
414
|
|
290
415
|
```ruby
|
291
416
|
@full_name = "Yuki Nishijima"
|
@@ -298,10 +423,10 @@ first_name, last_name = full_name.split(" ")
|
|
298
423
|
|
299
424
|
#### Bug Fixes
|
300
425
|
|
301
|
-
- Fixed a bug where did\_you\_mean changes some behaviours of Ruby 2.1.3/2.1.4 installed on Max OS X ( [#14](https://github.com/
|
302
|
-
- Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/
|
426
|
+
- Fixed a bug where did\_you\_mean changes some behaviours of Ruby 2.1.3/2.1.4 installed on Max OS X ( [#14](https://github.com/ruby/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem"), [<tt>44c451f</tt>](https://github.com/ruby/did_you_mean/commit/44c451f8c38b11763ba28ddf1ceb9696707ccea0), [<tt>9ebde21</tt>](https://github.com/ruby/did_you_mean/commit/9ebde211e92eac8494e704f627c62fea7fdbee16))
|
427
|
+
- Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/ruby/did_you_mean/commit/9865cc5a9ce926dd9ad4c20d575b710e5f257a4b))
|
303
428
|
|
304
|
-
## [v0.8.0](https://github.com/
|
429
|
+
## [v0.8.0](https://github.com/ruby/did_you_mean/tree/v0.8.0)
|
305
430
|
|
306
431
|
_<sup>released at 2014-10-27 02:03:13 UTC</sup>_
|
307
432
|
|
@@ -315,9 +440,9 @@ _<sup>released at 2014-10-27 02:03:13 UTC</sup>_
|
|
315
440
|
|
316
441
|
- Fixed a bug where did\_you\_mean unexpectedly disables [better\_errors](https://github.com/charliesome/better_errors)'s REPL
|
317
442
|
- Replaced [binding\_of\_caller](https://github.com/banister/binding_of_caller) dependency with [interception](https://github.com/ConradIrwin/interception)
|
318
|
-
- Fixed the wrong implementation of Levenshtein algorithm ( [#2](https://github.com/
|
443
|
+
- Fixed the wrong implementation of Levenshtein algorithm ( [#2](https://github.com/ruby/did_you_mean/pull/2 "Fix bug of DidYouMean::Levenshtein#min3."), [@fortissimo1997](https://github.com/fortissimo1997))
|
319
444
|
|
320
|
-
## [v0.7.0](https://github.com/
|
445
|
+
## [v0.7.0](https://github.com/ruby/did_you_mean/tree/v0.7.0)
|
321
446
|
|
322
447
|
_<sup>released at 2014-09-26 03:37:18 UTC</sup>_
|
323
448
|
|
@@ -335,7 +460,7 @@ _<sup>released at 2014-09-26 03:37:18 UTC</sup>_
|
|
335
460
|
|
336
461
|
- A lot of internal refactoring
|
337
462
|
|
338
|
-
## [v0.6.0](https://github.com/
|
463
|
+
## [v0.6.0](https://github.com/ruby/did_you_mean/tree/v0.6.0)
|
339
464
|
|
340
465
|
_<sup>released at 2014-05-18 00:23:24 UTC</sup>_
|
341
466
|
|
@@ -357,7 +482,7 @@ _<sup>released at 2014-05-18 00:23:24 UTC</sup>_
|
|
357
482
|
|
358
483
|
- Fixed a bug where did\_you\_mean segfaults on Ruby head(2.2.0dev)
|
359
484
|
|
360
|
-
## [v0.5.0](https://github.com/
|
485
|
+
## [v0.5.0](https://github.com/ruby/did_you_mean/tree/v0.5.0)
|
361
486
|
|
362
487
|
_<sup>released at 2014-05-10 17:59:54 UTC</sup>_
|
363
488
|
|
@@ -365,7 +490,7 @@ _<sup>released at 2014-05-10 17:59:54 UTC</sup>_
|
|
365
490
|
|
366
491
|
- Added support for Ruby 2.1.2
|
367
492
|
|
368
|
-
## [v0.4.0](https://github.com/
|
493
|
+
## [v0.4.0](https://github.com/ruby/did_you_mean/tree/v0.4.0)
|
369
494
|
|
370
495
|
_<sup>released at 2014-04-20 02:10:31 UTC</sup>_
|
371
496
|
|
@@ -385,7 +510,7 @@ User.new(flrst_name: "wrong flrst name")
|
|
385
510
|
|
386
511
|
- Fixed a bug where did\_you\_mean doesn't work with `ActiveRecord::UnknownAttributeError`
|
387
512
|
|
388
|
-
## [v0.3.1](https://github.com/
|
513
|
+
## [v0.3.1](https://github.com/ruby/did_you_mean/tree/v0.3.1)
|
389
514
|
|
390
515
|
_<sup>released at 2014-03-20 23:16:20 UTC</sup>_
|
391
516
|
|
@@ -394,7 +519,7 @@ _<sup>released at 2014-03-20 23:16:20 UTC</sup>_
|
|
394
519
|
- Changed output for readability.
|
395
520
|
- Made the spell checking algorithm slight better to find the correct method.
|
396
521
|
|
397
|
-
## [v0.3.0](https://github.com/
|
522
|
+
## [v0.3.0](https://github.com/ruby/did_you_mean/tree/v0.3.0)
|
398
523
|
|
399
524
|
_<sup>released at 2014-03-20 23:13:13 UTC</sup>_
|
400
525
|
|
@@ -402,7 +527,7 @@ _<sup>released at 2014-03-20 23:13:13 UTC</sup>_
|
|
402
527
|
|
403
528
|
- Added support for Ruby 2.1.1 and 2.2.0(head).
|
404
529
|
|
405
|
-
## [v0.2.0](https://github.com/
|
530
|
+
## [v0.2.0](https://github.com/ruby/did_you_mean/tree/v0.2.0)
|
406
531
|
|
407
532
|
_<sup>released on 2014-03-20 23:12:13 UTC</sup>_
|
408
533
|
|
@@ -414,7 +539,7 @@ _<sup>released on 2014-03-20 23:12:13 UTC</sup>_
|
|
414
539
|
|
415
540
|
- dropped support for JRuby and Rubbinious.
|
416
541
|
|
417
|
-
## [v0.1.0: First Release](https://github.com/
|
542
|
+
## [v0.1.0: First Release](https://github.com/ruby/did_you_mean/tree/v0.1.0)
|
418
543
|
|
419
544
|
_<sup>released on 2014-03-20 23:11:14 UTC</sup>_
|
420
545
|
|