summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [WIP] add error_squiggle gemYusuke Endoh2021-06-2914-8/+1503
| | | | | | | | | | | | | ``` $ ./local/bin/ruby -e '1.time {}' -e:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError) 1.time {} ^^^^^ Did you mean? times ``` https://bugs.ruby-lang.org/issues/17930
* Fix crash on RGENGC_CHECK_MODE=4Peter Zhu2021-06-291-0/+2
| | | | | | | | When running btest there is a crash when compiled with RGENGC_CHECK_MODE=4. The crash happens because `during_gc` is not turned off before `gc_marks_check` is called, causing the marking to happen on the main mark stack instead of mark stack created in `objspace_allrefs`.
* Add basic test for updated IO wait functions.Samuel Williams2021-06-295-49/+401
|
* Use assert_not_match "Did you mean?" for UncorrectableNameCheckTestYusuke Endoh2021-06-291-1/+1
| | | | | | | | | | ... 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
* Use String#include? instead of end_with? to avoid message duplicationYusuke Endoh2021-06-291-1/+1
| | | | | | | | | | | 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?. https://github.com/ruby/did_you_mean/commit/b35e030549
* Let Correctable#original_message skip prepended method definitionsYusuke Endoh2021-06-291-1/+8
| | | | | | | | | | | | | | | | | 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`. https://github.com/ruby/did_you_mean/commit/8352c154e3
* Should require "rbconfig" to use RbConfigNobuyoshi Nakada2021-06-291-0/+1
| | | | https://github.com/ruby/did_you_mean/commit/fbe5aaaae8
* Start v1.6.0 developmentYuki Nishijima2021-06-291-1/+1
| | | | https://github.com/ruby/did_you_mean/commit/3f69171813
* Prefer qualified names under ThreadNobuyoshi Nakada2021-06-2923-179/+181
|
* * 2021-06-29 [ci skip]git2021-06-291-1/+1
|
* Avoid `free(3)`ing invalid pointerxtkoba2021-06-281-0/+2
| | | Fixes [Bug #17794]
* Refined define_thread_classNobuyoshi Nakada2021-06-281-4/+4
| | | | | | | Reduce duplications * ID caluculations of the same name * checks against the same name * registration to the root module hash
* * 2021-06-28 [ci skip]git2021-06-281-1/+1
|
* Share freeze option handlingNobuyoshi Nakada2021-06-283-24/+11
|
* Show leaked file descriptors only, without cwd, txt, and so onNobuyoshi Nakada2021-06-271-1/+1
|
* Narrow the tracing of object allocations to during each testNobuyoshi Nakada2021-06-271-25/+25
|
* Check if closed after each yield [Bug #17661]Nobuyoshi Nakada2021-06-272-1/+39
|
* [ruby/irb] Optimize show_source command furtherTakashi Kokubun2021-06-271-1/+4
| | | | | | | | | | | | | | | | | | | | https://github.com/ruby/irb/pull/249 actually slowed down how `code` is concatenated. The original way of creating `code` is faster. [before] user system total real 2.420137 0.005364 2.425501 ( 2.426264) [after] user system total real 1.000221 0.007454 1.007675 ( 1.008295) Theoretically, this implementation might skip lines that don't appear in Ripper tokens, but this assumes such lines don't impact whether the code passes compilation or not. At least normal blank lines seem to have an `on_ignored_nl` token anyway though. https://github.com/ruby/irb/commit/27dd2867cd
* [ruby/irb] Improve performance of `show_source` for large classMasataka Pocke Kuwabara2021-06-271-4/+11
| | | | https://github.com/ruby/irb/commit/2b79e9ad21
* Added macros for days in monthNobuyoshi Nakada2021-06-271-13/+8
|
* Shrink monthly tablesNobuyoshi Nakada2021-06-271-6/+6
|
* * 2021-06-27 [ci skip]git2021-06-271-1/+1
|
* Work around issue transcoding issue with non-ASCII compatible encodings and ↵Jeremy Evans2021-06-262-0/+25
| | | | | | | | | | | | | | | | | | | | xml escaping When using a non-ASCII compatible source and destination encoding and xml escaping (the :xml option to String#encode), the resulting string was broken, as it used the correct non-ASCII compatible encoding, but contained data that was ASCII-compatible instead of compatible with the string's encoding. Work around this issue by detecting the case where both the source and destination encoding are non-ASCII compatible, and transcoding the source string from the non-ASCII compatible encoding to UTF-8. The xml escaping code will correctly handle the UTF-8 source string and the return the correctly encoded and escaped value. Fixes [Bug #12052] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Scan the coderange in the given encodingNobuyoshi Nakada2021-06-263-9/+46
|
* Disable RBIMPL_ATTR_DEPRECATED for Coverity Scan buildYusuke Endoh2021-06-261-1/+5
| | | | | Coverity Scan emulates gcc but seems not to support this attribute correctly.
* * 2021-06-26 [ci skip]git2021-06-261-1/+1
|
* iseq.c: Make ast_line_count return 0 when syntax error occurredYusuke Endoh2021-06-261-0/+4
| | | | | | | | | | | | This broke coverage CI ``` 1) Failure: TestRequire#test_load_syntax_error [/home/runner/work/actions/actions/ruby/test/ruby/test_require.rb:228]: Exception(SyntaxError) with message matches to /unexpected/. [SyntaxError] exception expected, not #<TypeError: no implicit conversion of false into Integer>. ``` https://github.com/ruby/actions/runs/2914743968?check_suite_focus=true
* Revert "Revert "[ruby/reline] Fix failed test""aycabta2021-06-251-59/+59
| | | | | | I'm so sorry, the previous revert was just a mistake. This reverts commit 9103c3ba8bc09f287f69ca322f58faa34e003f2e.
* Revert "[ruby/reline] Fix failed test"aycabta2021-06-251-59/+59
| | | | This reverts commit 491591c7cee842601118efc2698e0e41283827b3.
* [ruby/reline] Fix missing require.Samuel Williams2021-06-251-0/+1
| | | | https://github.com/ruby/reline/commit/010b28dfe9
* [ruby/reline] Avoid using blocking `IO.select`.Samuel Williams2021-06-251-8/+2
| | | | https://github.com/ruby/reline/commit/de94746393
* [ruby/reline] Fix failed testima1zumi2021-06-251-59/+59
| | | | | | | | | For ruby/ruby repository's AppVeyor CI (Windows environment), `Reline::IOGate.encoding` will be changed from `UTF-8` to `Windows-31J` after the test is run. So, when `test/reline/test_key_actor_emacs.rb` is loaded, `Reline::IOGate.encoding == Encoding::UTF_8` will be `true`, but at the time of test execution, `Reline::IOGate.encoding` is `Windows-31J`. For this reason, I changed the test method to check `Reline::IOGate.encoding` in the test method. https://github.com/ruby/reline/commit/10e1ce3320
* Followed up 66d2fc7989d741bf5a73286233139901cecb4fc2Hiroshi SHIBATA2021-06-251-1/+1
|
* [ruby/racc] Remove Object monkey patchAaron Patterson2021-06-251-8/+2
| | | | | | I don't think we need this monkey patch anymore, so lets remove it! https://github.com/ruby/racc/commit/464485e912
* [ruby/racc] Removed needless condition for old versions of RubyGems.Hiroshi SHIBATA2021-06-251-1/+0
| | | | https://github.com/ruby/racc/commit/fe3183b1ff
* [ruby/racc] Drop to support Ruby 2.4Hiroshi SHIBATA2021-06-251-0/+1
| | | | https://github.com/ruby/racc/commit/5af1a42a3b
* [ruby/racc] Followed up #162Hiroshi SHIBATA2021-06-251-6/+7
| | | | https://github.com/ruby/racc/commit/d66cd12166
* [ruby/racc] Stop compressing integer listsJean Boussier2021-06-258-7100/+20103
| | | | | | | | | | It is unclear why this was implemented, I assume it was for performance back in 2006. However today, this compression defeats bytecode caching entirely and end up being counter productive. https://github.com/ruby/racc/commit/ae3703c1d0
* Remove shift of ep when computing Proc#hashJeremy Evans2021-06-242-1/+10
| | | | | | | | The shift was causing far fewer unique values of hash than expected. Fix pointed out by xtkoba (Tee KOBAYASHI) Fixes [Bug #17951]
* * 2021-06-25 [ci skip]git2021-06-251-1/+1
|
* Actually ignore FNM_CASEFOLD flag in Dir.globJeremy Evans2021-06-242-1/+12
| | | | | | | | | This was already documented as being ignored, but it wasn't being ignored, causing an issue in a particular case where a UTF-8 pattern was provided and a filename was tested that wasn't valid UTF-8. Fixes [Bug #14456]
* [DOC] fixed return value of ENV.clone [ci skip]Nobuyoshi Nakada2021-06-241-3/+3
|
* Tests for MiniTest define anonymous test casesNobuyoshi Nakada2021-06-241-1/+1
|
* test: imply random test order by --seed optionNobuyoshi Nakada2021-06-241-1/+4
|
* Remove also debug symbol directory at clean on macOSNobuyoshi Nakada2021-06-242-1/+4
|
* Prefer configured command as RM_RFNobuyoshi Nakada2021-06-241-1/+1
|
* Reduce repeated same codeNobuyoshi Nakada2021-06-241-13/+9
|
* Load rubygems before default gemsNobuyoshi Nakada2021-06-241-3/+3
|
* Introduced RUBY_CRLF_ENVIRONMENT to simplify repeated conditionNobuyoshi Nakada2021-06-241-8/+14
|
* rand_bytes: prefer rng->get_bytes卜部昌平2021-06-241-1/+1
| | | | | Because why not. There was no use case of rng->get_bytes before this changeset.