summaryrefslogtreecommitdiff
path: root/test/did_you_mean
AgeCommit message (Collapse)Author
2025-06-04[ruby/did_you_mean] Revert "Alias value to take in old Ruby"Hiroshi SHIBATA
This reverts commit https://github.com/ruby/did_you_mean/commit/15d7b0bfa573. https://github.com/ruby/did_you_mean/commit/86a7daca19
2025-06-03[ruby/did_you_mean] Omit some tests with JRubyHiroshi SHIBATA
https://github.com/ruby/did_you_mean/commit/a7a438ae27
2025-06-03[ruby/did_you_mean] Alias value to take in old RubyHiroshi SHIBATA
https://github.com/ruby/did_you_mean/commit/15d7b0bfa5
2025-05-31`Ractor::Port`Koichi Sasada
* Added `Ractor::Port` * `Ractor::Port#receive` (support multi-threads) * `Rcator::Port#close` * `Ractor::Port#closed?` * Added some methods * `Ractor#join` * `Ractor#value` * `Ractor#monitor` * `Ractor#unmonitor` * Removed some methods * `Ractor#take` * `Ractor.yield` * Change the spec * `Racotr.select` You can wait for multiple sequences of messages with `Ractor::Port`. ```ruby ports = 3.times.map{ Ractor::Port.new } ports.map.with_index do |port, ri| Ractor.new port,ri do |port, ri| 3.times{|i| port << "r#{ri}-#{i}"} end end p ports.each{|port| pp 3.times.map{port.receive}} ``` In this example, we use 3 ports, and 3 Ractors send messages to them respectively. We can receive a series of messages from each port. You can use `Ractor#value` to get the last value of a Ractor's block: ```ruby result = Ractor.new do heavy_task() end.value ``` You can wait for the termination of a Ractor with `Ractor#join` like this: ```ruby Ractor.new do some_task() end.join ``` `#value` and `#join` are similar to `Thread#value` and `Thread#join`. To implement `#join`, `Ractor#monitor` (and `Ractor#unmonitor`) is introduced. This commit changes `Ractor.select()` method. It now only accepts ports or Ractors, and returns when a port receives a message or a Ractor terminates. We removes `Ractor.yield` and `Ractor#take` because: * `Ractor::Port` supports most of similar use cases in a simpler manner. * Removing them significantly simplifies the code. We also change the internal thread scheduler code (thread_pthread.c): * During barrier synchronization, we keep the `ractor_sched` lock to avoid deadlocks. This lock is released by `rb_ractor_sched_barrier_end()` which is called at the end of operations that require the barrier. * fix potential deadlock issues by checking interrupts just before setting UBF. https://bugs.ruby-lang.org/issues/21262 Notes: Merged: https://github.com/ruby/ruby/pull/13445
2025-01-08Switch to use ostruct to open3 with suggestion testHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12531
2024-02-15Do not include a backtick in error messages and backtracesYusuke Endoh
[Feature #16495]
2023-02-19[ruby/did_you_mean] Support the new message format of NameError inYusuke Endoh
Ruby 3.3 (https://github.com/ruby/did_you_mean/pull/184) This change accepts the following change of the message of NameError in a test. https://bugs.ruby-lang.org/issues/18285#note-37 ``` old: undefined method `sizee' for #<File:...> new: undefined method `sizee' for an instance of File ```
2022-12-05[ruby/did_you_mean] Do not suggest #name= for #name and vice versaMatthew Boeh
(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-09-01[ruby/did_you_mean] Fixed correction duplicates in VariableNameCheckerImir Kiyamov
https://github.com/ruby/did_you_mean/commit/c3fc412f6f
2022-06-07Manually merged https://github.com/ruby/did_you_mean/pull/177Hiroshi SHIBATA
2022-05-20Rewrite with assert_ractor for multiple ractor environmentHiroshi SHIBATA
2022-05-20Picked the missing test file from ↵Hiroshi SHIBATA
https://github.com/ruby/did_you_mean/commit/8faba54b2d3ec9aa570691775f143801308c5b2f
2021-12-24Sync did_you_meanYuki Nishijima
2021-12-23Revert the commits for did_you_meanYuki Nishijima
This reverts commit feaf4fbc3fa16382fbd07158c448c7b5bdae78b5. This reverts commit 0d4bfbdbe1f880c712b3e60de5fce423e6096f8d. This reverts commit ac4e0978ee4358430396403065eabe1aca05784f.
2021-12-23Remove test that activates Ractor unexpectedlyYuki Nishijima
2021-12-22* gems/default_gems: Sync did_you_meanYuki Nishijima
2021-12-21Revert commits for did_you_meanYuki Nishijima
This reverts commit 4560091b1c99ab33db0d653b9dd2d977fe4676d5. This reverts commit a6f76122a2395bd914daa0aa04fb5a6ce4e0c045. This reverts commit e59b18a6379c55f15ccda85c27d6997d44ef5293. This reverts commit 505dfae05d56d844ea150676edb87850a406d071.
2021-12-21* gems/default_gems: Fix CI buildsYuki Nishijima
2021-12-21* gems/default_gems: Sync did_you_meanYuki Nishijima
2021-10-22Sync did_you_mean againYuki Nishijima
2021-10-22Revert "Sync did_you_mean"Yuki Nishijima
This reverts commit e22d293e06966733e71a7fd9725eee06c03d0177.
2021-10-22Sync did_you_meanYuki Nishijima
2021-09-28[ruby/did_you_mean] Disable error_highlight when testing did_you_meanYusuke Endoh
Fixes #160 https://github.com/ruby/did_you_mean/commit/93df310873
2021-09-02Fix typo in test namePeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4800
2021-07-19[ruby/did_you_mean] Prevent "warning: ambiguity between regexp and two ↵Yusuke Endoh
divisions" ``` test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb:13: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator ``` http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20210630T033005Z.log.html.gz#test-all https://github.com/ruby/did_you_mean/commit/842ede4186
2021-06-29Use assert_not_match "Did you mean?" for UncorrectableNameCheckTestYusuke Endoh
... instead of exact matching. I'm now creating a built-in gem that modifies Exception's error message, so the expectation value is changed. IMO, it is good to check that did_you_mean suggestion is NOT added in the uncorrectable case. https://github.com/ruby/did_you_mean/commit/ebe88ec4d2
2020-10-27Revert "Fixed typo"Nobuyoshi Nakada
This reverts commit 379a5ca539af0e954b1cdf63b9365ad208b9c7f3. This "typo" is intentional to test the transposition detection by did_you_mean.
2020-10-27Fixed typoHiroshi SHIBATA
2020-06-06Sync did_you_meanYuki Nishijima
Notes: Merged: https://github.com/ruby/ruby/pull/3135
2020-05-12Revert "Sync did_you_mean"Nobuyoshi Nakada
This reverts commit 946dadd3f479198e87873a863d15c7660a8e2b56, which broke `TestGemRequire` and others.
2020-05-11Sync did_you_meanYuki Nishijima
2020-02-13support multi-run test for test/did_you_mean/test_verbose_formatter.rbS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/2894
2020-02-07support multi-run test for ↵S-H-GAMELINKS
test/did_you_mean/spell_checking/test_class_name_check.rb Notes: Merged: https://github.com/ruby/ruby/pull/2880
2019-12-23Port ↵Yuki Nishijima
https://github.com/ruby/did_you_mean/commit/dd1dd86e6c3188c36224d5dd4389676e6653a727
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], for default gems.
2019-12-02Fix Leaked file descriptor in test/did_you_meanKazuhiro NISHIYAMA
https://github.com/ruby/ruby/commit/de74d2c3b0005048a2c4433bde68b9be10c86f01/checks?check_suite_id=336910877#step:19:131 ``` Leaked file descriptor: NameErrorExtensionTest#test_correctable_error_objects_are_dumpable: 7 : #<File:test_name_error_extension.rb> ``` Notes: Merged: https://github.com/ruby/ruby/pull/2712
2019-11-30Relax test requirements for DYM's verbose formatterYuki Nishijima
2019-12-01remove spaces to pass a test.Koichi Sasada
23d7f4c5e1ce164e78d77de694dccc0c41f6de3d breaks a test which expect to match error message. To avoid this failure, use #strip for expect and actual results.
2019-12-01* remove trailing spaces. [ci skip]git
2019-11-30Promote did_you_mean to default gemKevin Deisz
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. Notes: Merged: https://github.com/ruby/ruby/pull/2689