Commit graph

28 commits

Author SHA1 Message Date
Hiroshi SHIBATA
1142bc875b [ruby/did_you_mean] Bump version to 1.6.3
f7703add76
2022-12-19 14:59:59 +09:00
Matthew Boeh
1602d75c34 [ruby/did_you_mean] Do not suggest #name= for #name and vice versa
(https://github.com/ruby/did_you_mean/pull/180)

* Do not suggest #name= for #name and vice versa
* Avoid allocating unnecessary MatchData

Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>
Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>
2022-12-05 13:16:33 +00:00
Hiroshi SHIBATA
3fe5890f7b [ruby/did_you_mean] Bump version to 1.6.2
f5b15128e2
2022-12-05 10:29:44 +00:00
Imir Kiyamov
f67ab7f30c [ruby/did_you_mean] Fixed correction duplicates in VariableNameChecker
c3fc412f6f
2022-09-01 19:47:39 +09:00
Hiroshi SHIBATA
11b9dd8ccb
Manually merged https://github.com/ruby/did_you_mean/pull/177 2022-06-07 15:24:48 +09:00
Jean byroot Boussier
bd8df25cdc
[ruby/did_you_mean] Fix frozen_string_literal is ignored after any tokens warning. (https://github.com/ruby/did_you_mean/pull/172)
```
did_you_mean/formatters/verbose_formatter.rb:5: warning: `frozen_string_literal' is ignored after any tokens
```

531760f323
2022-05-20 17:32:18 +09:00
Yuki Nishijima
f9712b029b Sync did_you_mean 2021-12-24 23:20:30 +09:00
Yuki Nishijima
de841e2e28 Revert the commits for did_you_mean
This reverts commit feaf4fbc3f.
This reverts commit 0d4bfbdbe1.
This reverts commit ac4e0978ee.
2021-12-23 10:09:10 +09:00
Yuki Nishijima
ac4e0978ee * gems/default_gems: Sync did_you_mean 2021-12-22 20:29:18 +09:00
Yuki Nishijima
cdb7d699d0 Revert commits for did_you_mean
This reverts commit 4560091b1c.
This reverts commit a6f76122a2.
This reverts commit e59b18a637.
This reverts commit 505dfae05d.
2021-12-21 22:10:03 +09:00
Yuki Nishijima
505dfae05d * gems/default_gems: Sync did_you_mean 2021-12-21 19:03:25 +09:00
Yuki Nishijima
66df18c55e Sync did_you_mean again 2021-10-22 21:00:23 -04:00
Yuki Nishijima
22249bbb37 Revert "Sync did_you_mean"
This reverts commit e22d293e06.
2021-10-22 20:56:26 -04:00
Yuki Nishijima
e22d293e06 Sync did_you_mean 2021-10-22 20:35:40 -04:00
Yusuke Endoh
809f120374 Use String#include? instead of end_with? to avoid message duplication
Previously, did_you_mean used `msg.end_with?(suggestion)` to check if
its suggestion is already added.

I'm now creating a gem that also modifies Exception's message. This
breaks did_you_mean's duplication check.
This change makes the check use String#include? instead of end_with?.

b35e030549
2021-06-29 15:49:51 +09:00
Yusuke Endoh
612b6fcd37 Let Correctable#original_message skip prepended method definitions
Previously, DidYouMean::Correctable#original_message did
`method(:to_s).super_method.call` to call the original to_s method by
skipping Correctable#to_s.

I'm now creating a gem that prepends another to_s method to NameError,
which confuses the hack. An immediate solution is to replace it with
`method(:to_s).super_method.super_method.call` to skip the two methods.
But it is too ad-hoc.

This changeset uses more extensible approach and allow a prepended
module to declare that they should be skipped by defining a constant
named `SKIP_TO_S_FOR_SUPER_LOOKUP`.

8352c154e3
2021-06-29 15:49:51 +09:00
Nobuyoshi Nakada
4670458af8 Should require "rbconfig" to use RbConfig
fbe5aaaae8
2021-06-29 15:49:51 +09:00
Yuki Nishijima
8356d9e374 Start v1.6.0 development
3f69171813
2021-06-29 15:49:51 +09:00
Yuki Nishijima
95acd3c030 Sync did_you_mean 2020-12-22 14:42:32 +09:00
Yuki Nishijima
4178cbd297 Remove experimental feaures and related code completely
Original pull request: https://github.com/ruby/did_you_mean/pull/147
2020-06-06 14:13:19 -04:00
Yuki Nishijima
e5f5446528 Sync did_you_mean 2020-06-06 13:02:08 -04:00
Nobuyoshi Nakada
ee518cf077
Revert "Sync did_you_mean"
This reverts commit 946dadd3f4,
which broke `TestGemRequire` and others.
2020-05-12 16:27:25 +09:00
Yuki Nishijima
946dadd3f4 Sync did_you_mean 2020-05-11 23:25:04 -04:00
Yuki Nishijima
8e6d51e09a Sync did_you_mean 2019-12-24 18:41:55 -05:00
Yuki Nishijima
e2708068ad Drop delegate dependency
Original comment:
  2f26c9ee77
2019-12-13 21:40:52 -05:00
Kazuhiro NISHIYAMA
4c88107c54
Fix warning: already initialized constant DidYouMean::VERSION
```
.../gems/did_you_mean-1.3.1/lib/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION
.../lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here
```
2019-12-05 18:18:55 +09:00
Yuki Nishijima
18d3b5a93a Do not attempt to call methods on the receiver if it is a basic object 2019-12-04 19:55:01 -05:00
Kevin Deisz
171803d5d3 Promote did_you_mean to default gem
At the moment, there are some problems with regard to bundler + did_you_mean because of did_you_mean being a bundled gem. Since the vendored version of thor inside bundler and ruby itself explicitly requires did_you_mean, it can become difficult to load it when using Bundler.setup. See this issue: https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482733159 for more details.
2019-11-30 21:08:19 -05:00