did_you_mean 1.2.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +39 -0
  3. data/CHANGELOG.md +172 -57
  4. data/Gemfile +2 -0
  5. data/README.md +79 -28
  6. data/Rakefile +38 -12
  7. data/appveyor.yml +25 -0
  8. data/benchmark/jaro_winkler/memory_usage.rb +4 -4
  9. data/benchmark/jaro_winkler/speed.rb +14 -6
  10. data/benchmark/levenshtein/memory_usage.rb +4 -4
  11. data/benchmark/levenshtein/speed.rb +13 -8
  12. data/benchmark/require_path_checker.rb +47 -0
  13. data/benchmark/speed.yml +13 -0
  14. data/did_you_mean.gemspec +6 -4
  15. data/documentation/CHANGELOG.md.erb +8 -0
  16. data/documentation/changelog_generator.rb +34 -0
  17. data/documentation/human_typo_api.md +20 -0
  18. data/documentation/tree_spell_algorithm.md +82 -0
  19. data/documentation/tree_spell_checker_api.md +24 -0
  20. data/lib/did_you_mean.rb +95 -52
  21. data/lib/did_you_mean/core_ext/name_error.rb +4 -6
  22. data/lib/did_you_mean/experimental.rb +2 -2
  23. data/lib/did_you_mean/formatters/plain_formatter.rb +24 -0
  24. data/lib/did_you_mean/formatters/verbose_formatter.rb +36 -0
  25. data/lib/did_you_mean/levenshtein.rb +1 -1
  26. data/lib/did_you_mean/spell_checker.rb +8 -14
  27. data/lib/did_you_mean/spell_checkers/key_error_checker.rb +8 -2
  28. data/lib/did_you_mean/spell_checkers/method_name_checker.rb +48 -6
  29. data/lib/did_you_mean/spell_checkers/name_error_checkers.rb +2 -2
  30. data/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +5 -5
  31. data/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +56 -4
  32. data/lib/did_you_mean/spell_checkers/require_path_checker.rb +35 -0
  33. data/lib/did_you_mean/tree_spell_checker.rb +109 -0
  34. data/lib/did_you_mean/verbose.rb +2 -2
  35. data/lib/did_you_mean/version.rb +1 -1
  36. data/test/core_ext/test_name_error_extension.rb +48 -0
  37. data/test/edit_distance/{jaro_winkler_test.rb → test_jaro_winkler.rb} +2 -2
  38. data/test/fixtures/book.rb +1 -1
  39. data/test/fixtures/mini_dir.yml +15 -0
  40. data/test/fixtures/rspec_dir.yml +112 -0
  41. data/test/helper.rb +29 -0
  42. data/test/spell_checking/{class_name_check_test.rb → test_class_name_check.rb} +15 -11
  43. data/test/spell_checking/{key_name_check_test.rb → test_key_name_check.rb} +18 -8
  44. data/test/spell_checking/{method_name_check_test.rb → test_method_name_check.rb} +41 -13
  45. data/test/spell_checking/test_require_path_check.rb +32 -0
  46. data/test/spell_checking/{uncorrectable_name_check_test.rb → test_uncorrectable_name_check.rb} +3 -3
  47. data/test/spell_checking/{variable_name_check_test.rb → test_variable_name_check.rb} +36 -18
  48. data/test/{spell_checker_test.rb → test_spell_checker.rb} +2 -2
  49. data/test/test_tree_spell_checker.rb +170 -0
  50. data/test/test_verbose_formatter.rb +23 -0
  51. data/test/tree_spell/change_word.rb +61 -0
  52. data/test/tree_spell/human_typo.rb +69 -0
  53. data/test/tree_spell/test_change_word.rb +38 -0
  54. data/test/tree_spell/test_explore.rb +128 -0
  55. data/test/tree_spell/test_human_typo.rb +24 -0
  56. metadata +53 -66
  57. data/.ruby-version +0 -1
  58. data/.travis.yml +0 -14
  59. data/lib/did_you_mean/experimental/initializer_name_correction.rb +0 -20
  60. data/lib/did_you_mean/experimental/ivar_name_correction.rb +0 -74
  61. data/lib/did_you_mean/verbose_formatter.rb +0 -7
  62. data/test/core_ext/name_error_extension_test.rb +0 -47
  63. data/test/deprecated_formatter_test.rb +0 -9
  64. data/test/experimental/initializer_name_correction_test.rb +0 -15
  65. data/test/experimental/method_name_checker_test.rb +0 -13
  66. data/test/test_helper.rb +0 -13
  67. data/test/verbose_formatter_test.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f4be5515dd4b97b67817085bc1d133942f9a9ee869663992959a5b5311aaf44
4
- data.tar.gz: 180d2c3163cea5be2980f0ff703b850b716a17fee9673d63222b14a7ea31354c
3
+ metadata.gz: 3befc8f677ec57e2975d04b2095fcecf7314ff207150aa994b197894dba883af
4
+ data.tar.gz: dc5a44ad2f6058ef68913f4080a23141f39b23f3b30129fe753d5d88cca85cc0
5
5
  SHA512:
6
- metadata.gz: '028b440678251cd301b0d0b3aed95296d4d00da6e7ccc328aa87e407415fc8e7f73864cb7daa4ab8139f3e908e6102084ebcaf8ea85ff3e1ec0e4447561dc722'
7
- data.tar.gz: 79c98fd00c0b334818f4b4a2d769405a0536524ce7369139e9b096291251ea4a91b396c262e54ce77294bc38b75689c58a294956cd8f12c27a276d72ef746a36
6
+ metadata.gz: 4d60d78614d4a6650b2be87599d3c3d867ab74f4cdf7f6083594229e3c51588af57a5c9574ca35ced229558f4280cd3677cbd7944cc5cef55e34a4f7ff7addf3
7
+ data.tar.gz: df5f07a5893afee4e03af416230ee828c7c2c2dfb8e5e35b5c525bebdff03710645b4af192563dc546abd4c210f8f2e8ce15e90124503488b74db19bd700f71c
@@ -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.8', '2.6.6', '2.7.1', 'ruby-head', 'jruby-9.2.11.1', '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
@@ -1,28 +1,134 @@
1
- ## [v1.1.2](https://github.com/yuki24/did_you_mean/tree/v1.1.2)
1
+ ## v1.5.0
2
+
3
+ - Suggest require paths on LoadError ([#143](https://github.com/ruby/did_you_mean/pull/143))
4
+
5
+ ## [v1.4.0](https://github.com/ruby/did_you_mean/tree/v1.4.0)
6
+
7
+ _<sup>released at 2020-05-09 02:56:43 UTC</sup>_
8
+
9
+ 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)).
10
+
11
+ #### Features
12
+
13
+ - Add a new tree spell checker ([#119](https://github.com/ruby/did_you_mean/pull/119), [@obromios](https://github.com/obromios))
14
+ - Add a public API for registering an error ([#123](https://github.com/ruby/did_you_mean/pull/123), [@kddeisz](https://github.com/kddeisz))
15
+
16
+ #### Bug fixes
17
+
18
+ - 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))
19
+
20
+ #### Breaking changes
21
+
22
+ - Experimental features have been removed ([#135](https://github.com/ruby/did_you_mean/pull/135))
23
+
24
+ #### Internal changes
25
+
26
+ - Replace Travis CI with GitHub Actions ([#124](https://github.com/ruby/did_you_mean/pull/124))
27
+ - Drop mintiest dependency ([#129](https://github.com/ruby/did_you_mean/pull/129))
28
+ - Drop delegate dependency ([#138](https://github.com/ruby/did_you_mean/pull/138))
29
+
30
+ ## [v1.3.1](https://github.com/ruby/did_you_mean/tree/v1.3.1)
31
+
32
+ _<sup>released at 2019-09-29 03:58:46 UTC</sup>_
33
+
34
+ #### Bug fixes
35
+
36
+ - 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))
37
+ - Removes the empty `tmp/` directory to comply with `rpmlint` ([#122](https://github.com/ruby/did_you_mean/issues/122), [@pvalena](https://github.com/pvalena))
38
+ - 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))
39
+
40
+ ## [v1.3.0](https://github.com/ruby/did_you_mean/tree/v1.3.0)
41
+
42
+ _<sup>released at 2018-12-18 15:37:10 UTC</sup>_
43
+
44
+ **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.**
45
+
46
+ - 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.
47
+ - Versions earlier than 1.1.\* will still be maintained until Ruby 2.4 is deprecated.
48
+ - Versions earlier than 1.0.\* is still maintained, but are likely to be deprecated as Ruby 2.3 will (probably) be deprecated in 2019.
49
+ - Support for versions below 1.0 has already ended.
50
+
51
+ #### New features
52
+
53
+ - Suggest reserved words if there are close matches ([<tt>2a082a7</tt>](https://github.com/ruby/did_you_mean/commit/2a082a71991f5afe2e27ce9538103eac4c428025))
54
+
55
+ ```ruby
56
+ results = yiedl
57
+ # NameError => undefined local variable or method `yiedl' for ...
58
+ # Did you mean? yield
59
+ ```
60
+
61
+ #### Bug fixes
62
+
63
+ - 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))
64
+
65
+ ## [v1.2.2](https://github.com/ruby/did_you_mean/tree/v1.2.2)
66
+
67
+ _<sup>released at 2019-03-09 23:17:22 UTC</sup>_
68
+
69
+ #### Bug fixes
70
+
71
+ - 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))
72
+
73
+ ## [v1.2.1](https://github.com/ruby/did_you_mean/tree/v1.2.1)
74
+
75
+ _<sup>released at 2018-04-03 04:44:47 UTC</sup>_
76
+
77
+ #### Bug Fixes
78
+
79
+ - 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))
80
+ - 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))
81
+
82
+ #### Other Changes
83
+
84
+ - 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))
85
+
86
+ ## [v1.2.0](https://github.com/ruby/did_you_mean/tree/v1.2.0)
87
+
88
+ _<sup>released at 2018-01-02 20:49:35 UTC</sup>_
89
+
90
+ **This version&nbsp;1.2.0&nbsp;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&nbsp;1.2.\*&nbsp;will only be compatible with Ruby 2.5.0 and later as well. Versions earlier than&nbsp;1.1.\*&nbsp;will still be maintained until Ruby 2.4 is deprecated. Any other versions below&nbsp;1.0&nbsp;will no longer be maintained.**
91
+
92
+ #### New features
93
+
94
+ - 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),&nbsp;[https://bugs.ruby-lang.org/issues/12063](https://bugs.ruby-lang.org/issues/12063))
95
+ - 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))
96
+ - 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
97
+
98
+ ## [v1.1.3](https://github.com/ruby/did_you_mean/tree/v1.1.3)
99
+
100
+ _<sup>released at 2019-03-09 23:16:54 UTC</sup>_
101
+
102
+ #### Bug fixes
103
+
104
+ - 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))
105
+ - 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))
106
+
107
+ ## [v1.1.2](https://github.com/ruby/did_you_mean/tree/v1.1.2)
2
108
 
3
109
  _<sup>released at 2017-09-24 07:28:48 UTC</sup>_
4
110
 
5
- **This version is compatible with Ruby 2.4 and older**
111
+ **This version is only compatible with Ruby 2.4 and later.**
6
112
 
7
113
  #### Bug Fixes
8
114
 
9
- - Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/yuki24/did_you_mean/pull/84), [<tt>c2e4008</tt>](https://github.com/yuki24/did_you_mean/commit/c2e40083cef604c00ccd10efc6d7a5036ad9eb5b))
115
+ - 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))
10
116
 
11
- ## [v1.1.1](https://github.com/yuki24/did_you_mean/tree/v1.1.1)
117
+ ## [v1.1.1](https://github.com/ruby/did_you_mean/tree/v1.1.1)
12
118
 
13
119
  _<sup>released at 2017-09-24 07:24:02 UTC</sup>_
14
120
 
15
121
  ### This version has been yanked from Rubygems.org and is not available.
16
122
 
17
- ## [v1.1.0](https://github.com/yuki24/did_you_mean/tree/v1.1.0)
123
+ ## [v1.1.0](https://github.com/ruby/did_you_mean/tree/v1.1.0)
18
124
 
19
125
  _<sup>released at 2016-12-19 23:19:06 UTC</sup>_
20
126
 
21
- The version `1.1.0` only has support for Ruby 2.4.0 and later. Also, all patch releasess 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.
127
+ 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.
22
128
 
23
129
  #### New Features
24
130
 
25
- - Suggest a method name on a NameError from the `Struct#[]` or `Struct#[]=` method ([#73](https://github.com/yuki24/did_you_mean/pull/73)):
131
+ - Suggest a method name on a NameError from the `Struct#[]` or `Struct#[]=` method ([#73](https://github.com/ruby/did_you_mean/pull/73)):
26
132
 
27
133
  ```ruby
28
134
  Struct.new(:foo).new[:fooo]
@@ -42,9 +148,18 @@ The version `1.1.0` only has support for Ruby 2.4.0 and later. Also, all patch r
42
148
 
43
149
  #### Bug Fixes
44
150
 
45
- - 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/yuki24/did_you_mean/commit/0a1b7612252055e583a373b473932f789381ca0f))
151
+ - 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))
152
+
153
+ ## [v1.0.4](https://github.com/ruby/did_you_mean/tree/v1.0.4)
154
+
155
+ _<sup>released at 2019-03-09 23:16:38 UTC</sup>_
46
156
 
47
- ## [v1.0.3](https://github.com/yuki24/did_you_mean/tree/v1.0.3)
157
+ #### Bug fixes
158
+
159
+ - 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))
160
+ - 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))
161
+
162
+ ## [v1.0.3](https://github.com/ruby/did_you_mean/tree/v1.0.3)
48
163
 
49
164
  _<sup>released at 2017-09-24 07:22:07 UTC</sup>_
50
165
 
@@ -52,9 +167,9 @@ _<sup>released at 2017-09-24 07:22:07 UTC</sup>_
52
167
 
53
168
  #### Bug Fixes
54
169
 
55
- - Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/yuki24/did_you_mean/pull/84), [<tt>c2e4008</tt>](https://github.com/yuki24/did_you_mean/commit/c2e40083cef604c00ccd10efc6d7a5036ad9eb5b))
170
+ - 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))
56
171
 
57
- ## [v1.0.2](https://github.com/yuki24/did_you_mean/tree/v1.0.2)
172
+ ## [v1.0.2](https://github.com/ruby/did_you_mean/tree/v1.0.2)
58
173
 
59
174
  _<sup>released at 2016-11-20 18:03:07 UTC</sup>_
60
175
 
@@ -72,41 +187,41 @@ _<sup>released at 2016-11-20 18:03:07 UTC</sup>_
72
187
 
73
188
  - 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.
74
189
 
75
- ## [v1.0.1](https://github.com/yuki24/did_you_mean/tree/v1.0.1)
190
+ ## [v1.0.1](https://github.com/ruby/did_you_mean/tree/v1.0.1)
76
191
 
77
192
  _<sup>released at 2016-05-15 05:17:22 UTC</sup>_
78
193
 
79
194
  #### Bug Fixes
80
195
 
81
- - Fixed a bug where the gem suggests what is actually typed by the user: [<tt>1c52c88</tt>](https://github.com/yuki24/did_you_mean/commit/1c52c887c62b0921e799f94bcc4a846dc7cbc057)
82
- - Fixed features that didn't work on JRuby 9.1.0.0: [<tt>dc48dde</tt>](https://github.com/yuki24/did_you_mean/commit/dc48dde1b2a8f05aab1fcf897e1cb3075a206f53), [<tt>4de23f8</tt>](https://github.com/yuki24/did_you_mean/commit/4de23f880502c80c5f321371d39c08bb0fa34040), [<tt>00e3059</tt>](https://github.com/yuki24/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)
196
+ - 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)
197
+ - 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)
83
198
 
84
- ## [v1.0.0](https://github.com/yuki24/did_you_mean/tree/v1.0.0)
199
+ ## [v1.0.0](https://github.com/ruby/did_you_mean/tree/v1.0.0)
85
200
 
86
201
  _<sup>released at 2015-12-25 05:13:04 UTC</sup>_
87
202
 
88
203
  #### Features
89
204
 
90
- - Introduced a [verbose formatter](https://github.com/yuki24/did_you_mean#verbose-formatter)
91
- - Introduced an easy way to enabling [experimental features](https://github.com/yuki24/did_you_mean#experimental-features)
205
+ - Introduced a [verbose formatter](https://github.com/ruby/did_you_mean#verbose-formatter)
206
+ - Introduced an easy way to enabling [experimental features](https://github.com/ruby/did_you_mean#experimental-features)
92
207
 
93
208
  #### Bug Fixes
94
209
 
95
- - Fixed a bug where the Jaro-Winkler implementation returns the wrong distance when 2 identical strings are given. fixes [#58](https://github.com/yuki24/did_you_mean/pull/58)
210
+ - 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)
96
211
 
97
212
  #### Internal Changes
98
213
 
99
- - Slightly changed the spell checking algorithm. Take a look at [<tt>e2f5b24</tt>](https://github.com/yuki24/did_you_mean/commit/e2f5b2437f967565e4830eab6077f73ae166e0a7) for more details. fixes [#60](https://github.com/yuki24/did_you_mean/issues/60)
214
+ - 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)
100
215
 
101
- ## [v1.0.0.rc1](https://github.com/yuki24/did_you_mean/tree/v1.0.0.rc1)
216
+ ## [v1.0.0.rc1](https://github.com/ruby/did_you_mean/tree/v1.0.0.rc1)
102
217
 
103
218
  _<sup>released at 2015-12-25 05:02:25 UTC</sup>_
104
219
 
105
- #### Internal Chagens
220
+ #### Internal Changes
106
221
 
107
- - No longer uses `TracePoint` API by default. fixes [#55](https://github.com/yuki24/did_you_mean/issues/55) and [#56](https://github.com/yuki24/did_you_mean/issues/56)
222
+ - 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)
108
223
 
109
- ## [v1.0.0.beta3](https://github.com/yuki24/did_you_mean/tree/v1.0.0.beta3)
224
+ ## [v1.0.0.beta3](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta3)
110
225
 
111
226
  _<sup>released at 2015-12-25 04:56:13 UTC</sup>_
112
227
 
@@ -116,7 +231,7 @@ _<sup>released at 2015-12-25 04:56:13 UTC</sup>_
116
231
  - Use the `NameError#receiver` method in `DidYouMean:: ClassNameChecker` to know the namespace where the constant call is made
117
232
  - Refactored the `SpellCheckerTest`
118
233
 
119
- ## [v1.0.0.beta2](https://github.com/yuki24/did_you_mean/tree/v1.0.0.beta2)
234
+ ## [v1.0.0.beta2](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta2)
120
235
 
121
236
  _<sup>released at 2015-12-25 04:50:36 UTC</sup>_
122
237
 
@@ -124,7 +239,7 @@ _<sup>released at 2015-12-25 04:50:36 UTC</sup>_
124
239
 
125
240
  - Fixed a bug where the gem doesn't install properly on Ruby 2.3.0dev
126
241
 
127
- ## [v1.0.0.beta1](https://github.com/yuki24/did_you_mean/tree/v1.0.0.beta1)
242
+ ## [v1.0.0.beta1](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta1)
128
243
 
129
244
  _<sup>released at 2015-12-25 05:27:53 UTC</sup>_
130
245
 
@@ -138,7 +253,7 @@ _<sup>released at 2015-12-25 05:27:53 UTC</sup>_
138
253
  - The interception gem has been removed from the dependencies
139
254
  - Removed code that was needed to support multiple Ruby implementations
140
255
 
141
- ## [v0.10.0](https://github.com/yuki24/did_you_mean/tree/v0.10.0)
256
+ ## [v0.10.0](https://github.com/ruby/did_you_mean/tree/v0.10.0)
142
257
 
143
258
  _<sup>released at 2015-08-21 06:44:11 UTC</sup>_
144
259
 
@@ -156,28 +271,28 @@ _<sup>released at 2015-08-21 06:44:11 UTC</sup>_
156
271
  ```
157
272
 
158
273
  - Support for JRuby 9.0.0.0
159
- - Prefix-based correction ( [@tjohn](https://github.com/tjohn), [#50](https://github.com/yuki24/did_you_mean/issues/50 "Match start of method name"), [#49](https://github.com/yuki24/did_you_mean/issues/49 "Use Jaro distance instead of Jaro-Winkler distance"))
274
+ - 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"))
160
275
  - Correction search is about 75% faster than 0.9.10
161
276
 
162
277
  #### Breaking Changes
163
278
 
164
279
  - The ActiveRecord integration has been removed
165
280
 
166
- ## [v0.9.10](https://github.com/yuki24/did_you_mean/tree/v0.9.10)
281
+ ## [v0.9.10](https://github.com/ruby/did_you_mean/tree/v0.9.10)
167
282
 
168
283
  _<sup>released at 2015-05-14 03:04:47 UTC</sup>_
169
284
 
170
285
  #### Bug Fixes
171
286
 
172
- - 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/yuki24/did_you_mean/issues/51 "Duplicate output for constants in separate gem"))
287
+ - 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"))
173
288
 
174
- ## [v0.9.9](https://github.com/yuki24/did_you_mean/tree/v0.9.9)
289
+ ## [v0.9.9](https://github.com/ruby/did_you_mean/tree/v0.9.9)
175
290
 
176
291
  _<sup>released at 2015-05-13 03:48:19 UTC</sup>_
177
292
 
178
293
  #### Features
179
294
 
180
- - Order word suggestions based on Levenshtein distance ( [@tleish](https://github.com/tleish), [#31](https://github.com/yuki24/did_you_mean/pull/31))
295
+ - Order word suggestions based on Levenshtein distance ( [@tleish](https://github.com/tleish), [#31](https://github.com/ruby/did_you_mean/pull/31))
181
296
 
182
297
  #### Internal Changes
183
298
 
@@ -185,7 +300,7 @@ _<sup>released at 2015-05-13 03:48:19 UTC</sup>_
185
300
  - Speed up Levenshtein distance calculation by about 40%
186
301
  - The Java extension has been replaced with a pure JRuby implementation
187
302
 
188
- ## [v0.9.8](https://github.com/yuki24/did_you_mean/tree/v0.9.8)
303
+ ## [v0.9.8](https://github.com/ruby/did_you_mean/tree/v0.9.8)
189
304
 
190
305
  _<sup>released at 2015-04-12 01:55:27 UTC</sup>_
191
306
 
@@ -193,7 +308,7 @@ _<sup>released at 2015-04-12 01:55:27 UTC</sup>_
193
308
 
194
309
  - Speed up Levenshtein by 50% and reduce 97% of memory usage
195
310
 
196
- ## [v0.9.7](https://github.com/yuki24/did_you_mean/tree/v0.9.7)
311
+ ## [v0.9.7](https://github.com/ruby/did_you_mean/tree/v0.9.7)
197
312
 
198
313
  _<sup>released at 2015-04-02 04:20:26 UTC</sup>_
199
314
 
@@ -201,23 +316,23 @@ _<sup>released at 2015-04-02 04:20:26 UTC</sup>_
201
316
 
202
317
  - Fixed an issue where _did\_you\_mean_ doesn't install on JRuby properly.
203
318
 
204
- ## [v0.9.6](https://github.com/yuki24/did_you_mean/tree/v0.9.6)
319
+ ## [v0.9.6](https://github.com/ruby/did_you_mean/tree/v0.9.6)
205
320
 
206
321
  _<sup>released at 2015-01-24 23:19:27 UTC</sup>_
207
322
 
208
323
  #### Bug Fixes
209
324
 
210
- - 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/yuki24/did_you_mean/issues/34 "Did\_you\_mean incorrectly called when attempting to call protected/private method"))
325
+ - 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"))
211
326
 
212
- ## [v0.9.5](https://github.com/yuki24/did_you_mean/tree/v0.9.5)
327
+ ## [v0.9.5](https://github.com/ruby/did_you_mean/tree/v0.9.5)
213
328
 
214
329
  _<sup>released at 2015-01-07 12:41:23 UTC</sup>_
215
330
 
216
331
  #### Bug Fixes
217
332
 
218
- - Whitelist `#safe_constantize` method from `ActiveSupport::Inflector` to avoid significant performance slowdown ( [@tleish](https://github.com/tleish), [#19](https://github.com/yuki24/did_you_mean/issues/19 "Significant Slowdown when Using Debugger"), [#20](https://github.com/yuki24/did_you_mean/pull/20 "Whitelisting safe\_constantize (ActiveSupport::Inflector) method"))
333
+ - 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"))
219
334
 
220
- ## [v0.9.4](https://github.com/yuki24/did_you_mean/tree/v0.9.4)
335
+ ## [v0.9.4](https://github.com/ruby/did_you_mean/tree/v0.9.4)
221
336
 
222
337
  _<sup>released at 2014-11-19 20:00:00 UTC</sup>_
223
338
 
@@ -225,7 +340,7 @@ _<sup>released at 2014-11-19 20:00:00 UTC</sup>_
225
340
 
226
341
  - Fixed a bug where no suggestions will be made on JRuby
227
342
 
228
- ## [v0.9.3](https://github.com/yuki24/did_you_mean/tree/v0.9.3)
343
+ ## [v0.9.3](https://github.com/ruby/did_you_mean/tree/v0.9.3)
229
344
 
230
345
  _<sup>released at 2014-11-18 03:50:11 UTC</sup>_
231
346
 
@@ -235,15 +350,15 @@ _<sup>released at 2014-11-18 03:50:11 UTC</sup>_
235
350
 
236
351
  - Replaced the crazy C extension with a so much better one (thanks to [@nobu](https://github.com/nobu)!)
237
352
 
238
- ## [v0.9.2](https://github.com/yuki24/did_you_mean/tree/v0.9.2)
353
+ ## [v0.9.2](https://github.com/ruby/did_you_mean/tree/v0.9.2)
239
354
 
240
355
  _<sup>released at 2014-11-17 15:32:33 UTC</sup>_
241
356
 
242
357
  #### Bug Fixes
243
358
 
244
- - Fixed a bug where did\_you\_mean doesn't compile on Ruby 2.1.2/2.1.5 ( [#16](https://github.com/yuki24/did_you_mean/issues/16 "Gem building failed on Debian 6.0.10 x86\_64"))
359
+ - 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"))
245
360
 
246
- ## [v0.9.1](https://github.com/yuki24/did_you_mean/tree/v0.9.1)
361
+ ## [v0.9.1](https://github.com/ruby/did_you_mean/tree/v0.9.1)
247
362
 
248
363
  _<sup>released at 2014-11-16 18:54:24 UTC</sup>_
249
364
 
@@ -252,15 +367,15 @@ _<sup>released at 2014-11-16 18:54:24 UTC</sup>_
252
367
  #### Internal Changes
253
368
 
254
369
  - Shrink the gem size by removing unneeded ruby header files.
255
- - 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/yuki24/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem").
370
+ - 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").
256
371
 
257
- ## [v0.9.0](https://github.com/yuki24/did_you_mean/tree/v0.9.0)
372
+ ## [v0.9.0](https://github.com/ruby/did_you_mean/tree/v0.9.0)
258
373
 
259
374
  _<sup>released at 2014-11-09 01:26:31 UTC</sup>_
260
375
 
261
376
  #### Features
262
377
 
263
- - did\_you\_mean now suggests instance variable names if `@` is missing ( [#12](https://github.com/yuki24/did_you_mean/issues/12 "Suggest instance- and class-vars"), [<tt>39d1e2b</tt>](https://github.com/yuki24/did_you_mean/commit/39d1e2bd66d6ff8acbc4dd5da922fc7e5fcefb20))
378
+ - 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))
264
379
 
265
380
  ```ruby
266
381
  @full_name = "Yuki Nishijima"
@@ -273,10 +388,10 @@ first_name, last_name = full_name.split(" ")
273
388
 
274
389
  #### Bug Fixes
275
390
 
276
- - 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/yuki24/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem"), [<tt>44c451f</tt>](https://github.com/yuki24/did_you_mean/commit/44c451f8c38b11763ba28ddf1ceb9696707ccea0), [<tt>9ebde21</tt>](https://github.com/yuki24/did_you_mean/commit/9ebde211e92eac8494e704f627c62fea7fdbee16))
277
- - Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/yuki24/did_you_mean/commit/9865cc5a9ce926dd9ad4c20d575b710e5f257a4b))
391
+ - 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))
392
+ - Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/ruby/did_you_mean/commit/9865cc5a9ce926dd9ad4c20d575b710e5f257a4b))
278
393
 
279
- ## [v0.8.0](https://github.com/yuki24/did_you_mean/tree/v0.8.0)
394
+ ## [v0.8.0](https://github.com/ruby/did_you_mean/tree/v0.8.0)
280
395
 
281
396
  _<sup>released at 2014-10-27 02:03:13 UTC</sup>_
282
397
 
@@ -290,9 +405,9 @@ _<sup>released at 2014-10-27 02:03:13 UTC</sup>_
290
405
 
291
406
  - Fixed a bug where did\_you\_mean unexpectedly disables [better\_errors](https://github.com/charliesome/better_errors)'s REPL
292
407
  - Replaced [binding\_of\_caller](https://github.com/banister/binding_of_caller) dependency with [interception](https://github.com/ConradIrwin/interception)
293
- - Fixed the wrong implementation of Levenshtein algorithm ( [#2](https://github.com/yuki24/did_you_mean/pull/2 "Fix bug of DidYouMean::Levenshtein#min3."), [@fortissimo1997](https://github.com/fortissimo1997))
408
+ - 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))
294
409
 
295
- ## [v0.7.0](https://github.com/yuki24/did_you_mean/tree/v0.7.0)
410
+ ## [v0.7.0](https://github.com/ruby/did_you_mean/tree/v0.7.0)
296
411
 
297
412
  _<sup>released at 2014-09-26 03:37:18 UTC</sup>_
298
413
 
@@ -310,7 +425,7 @@ _<sup>released at 2014-09-26 03:37:18 UTC</sup>_
310
425
 
311
426
  - A lot of internal refactoring
312
427
 
313
- ## [v0.6.0](https://github.com/yuki24/did_you_mean/tree/v0.6.0)
428
+ ## [v0.6.0](https://github.com/ruby/did_you_mean/tree/v0.6.0)
314
429
 
315
430
  _<sup>released at 2014-05-18 00:23:24 UTC</sup>_
316
431
 
@@ -332,7 +447,7 @@ _<sup>released at 2014-05-18 00:23:24 UTC</sup>_
332
447
 
333
448
  - Fixed a bug where did\_you\_mean segfaults on Ruby head(2.2.0dev)
334
449
 
335
- ## [v0.5.0](https://github.com/yuki24/did_you_mean/tree/v0.5.0)
450
+ ## [v0.5.0](https://github.com/ruby/did_you_mean/tree/v0.5.0)
336
451
 
337
452
  _<sup>released at 2014-05-10 17:59:54 UTC</sup>_
338
453
 
@@ -340,7 +455,7 @@ _<sup>released at 2014-05-10 17:59:54 UTC</sup>_
340
455
 
341
456
  - Added support for Ruby 2.1.2
342
457
 
343
- ## [v0.4.0](https://github.com/yuki24/did_you_mean/tree/v0.4.0)
458
+ ## [v0.4.0](https://github.com/ruby/did_you_mean/tree/v0.4.0)
344
459
 
345
460
  _<sup>released at 2014-04-20 02:10:31 UTC</sup>_
346
461
 
@@ -360,7 +475,7 @@ User.new(flrst_name: "wrong flrst name")
360
475
 
361
476
  - Fixed a bug where did\_you\_mean doesn't work with `ActiveRecord::UnknownAttributeError`
362
477
 
363
- ## [v0.3.1](https://github.com/yuki24/did_you_mean/tree/v0.3.1)
478
+ ## [v0.3.1](https://github.com/ruby/did_you_mean/tree/v0.3.1)
364
479
 
365
480
  _<sup>released at 2014-03-20 23:16:20 UTC</sup>_
366
481
 
@@ -369,7 +484,7 @@ _<sup>released at 2014-03-20 23:16:20 UTC</sup>_
369
484
  - Changed output for readability.
370
485
  - Made the spell checking algorithm slight better to find the correct method.
371
486
 
372
- ## [v0.3.0](https://github.com/yuki24/did_you_mean/tree/v0.3.0)
487
+ ## [v0.3.0](https://github.com/ruby/did_you_mean/tree/v0.3.0)
373
488
 
374
489
  _<sup>released at 2014-03-20 23:13:13 UTC</sup>_
375
490
 
@@ -377,7 +492,7 @@ _<sup>released at 2014-03-20 23:13:13 UTC</sup>_
377
492
 
378
493
  - Added support for Ruby 2.1.1 and 2.2.0(head).
379
494
 
380
- ## [v0.2.0](https://github.com/yuki24/did_you_mean/tree/v0.2.0)
495
+ ## [v0.2.0](https://github.com/ruby/did_you_mean/tree/v0.2.0)
381
496
 
382
497
  _<sup>released on 2014-03-20 23:12:13 UTC</sup>_
383
498
 
@@ -389,7 +504,7 @@ _<sup>released on 2014-03-20 23:12:13 UTC</sup>_
389
504
 
390
505
  - dropped support for JRuby and Rubbinious.
391
506
 
392
- ## [v0.1.0: First Release](https://github.com/yuki24/did_you_mean/tree/v0.1.0)
507
+ ## [v0.1.0: First Release](https://github.com/ruby/did_you_mean/tree/v0.1.0)
393
508
 
394
509
  _<sup>released on 2014-03-20 23:11:14 UTC</sup>_
395
510