summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [Bug #19399] Parsing invalid heredoc inside block parameterNobuyoshi Nakada2023-02-021-0/+12
| | | | | Although this is of course invalid as Ruby code, allow to just parse and tokenize.
* [Bug #19398] Memory leak in WeakMapPeter Zhu2023-02-011-0/+9
| | | | | | | | | | | | | | | | There's a memory leak in ObjectSpace::WeakMap due to not freeing the `struct weakmap`. It can be seen in the following script: ``` 100.times do 10000.times do ObjectSpace::WeakMap.new end # Output the Resident Set Size (memory usage, in KB) of the current Ruby process puts `ps -o rss= -p #{$$}` end ```
* [rubygems/rubygems] Introduce to specify deprecated version for ↵Hiroshi SHIBATA2023-02-011-0/+25
| | | | | | | | | rubygems_deprecate_command. We sometimes to remove minor command without bumping major version. This feature helps this deprecation process. https://github.com/rubygems/rubygems/commit/41301cd2a8
* YJIT: Fix BorrowMutError on BOP invalidation (#7212)Takashi Kokubun2023-01-311-0/+18
|
* [ruby/psych] Update for stricter 1.2 syntaxCharles Oliver Nutter2023-01-311-16/+16
| | | | | | | This allows these tests to pass on SnakeYAML Engine -- which is a 1.2-only YAML library -- while still passing on libyaml 1.1. https://github.com/ruby/psych/commit/f44269fc9b
* [rubygems/rubygems] Don't load Bundler from RubyGems testsDavid Rodríguez2023-01-312-412/+419
| | | | https://github.com/rubygems/rubygems/commit/c2e4cb7b5e
* mkconfig: Map `includedir` only for system rubyNobuyoshi Nakada2023-01-312-11/+2
| | | | | | Only when installing to the system path on macOS, prepend '$(SDKROOT)' and remap `includedir`. Fix https://github.com/rbenv/ruby-build/discussions/2123
* YJIT: Fix BorrowMutError on GC.compact (#7176)Takashi Kokubun2023-01-301-0/+16
| | | YJIT: Fix BorrowMutError
* [rubygems/rubygems] install rust extensions into expected directory nestingMat Sadler2023-01-306-6/+7
| | | | https://github.com/rubygems/rubygems/commit/85ea86d348
* [rubygems/rubygems] use cargo to get crate nameMat Sadler2023-01-304-28/+14
| | | | | | | | | | | | the final copying of the extension into place has been slimmed down, reflecting that it only needs to copy a single file, rather than replicating the more involved process used for a C ext this also refactors #build so that #cargo_crate_name only needs to be called once, and hopefully the build flow is easier to understand https://github.com/rubygems/rubygems/commit/5a0d7f2e6c
* [rubygems/rubygems] remove unused files in cargo builder test fixturesMat Sadler2023-01-302-42/+0
| | | | https://github.com/rubygems/rubygems/commit/233847513b
* Fix parsing of regexps that toggle extended mode on/off inside regexpJeremy Evans2023-01-301-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken in ec3542229b29ec93062e9d90e877ea29d3c19472. That commit didn't handle cases where extended mode was turned on/off inside the regexp. There are two ways to turn extended mode on/off: ``` /(?-x:#y)#z /x =~ '#y' /(?-x)#y(?x)#z /x =~ '#y' ``` These can be nested inside the same regexp: ``` /(?-x:(?x)#x (?-x)#y)#z /x =~ '#y' ``` As you can probably imagine, this makes handling these regexps somewhat complex. Due to the nesting inside portions of regexps, the unassign_nonascii function needs to be recursive. In recursive mode, it needs to track both opening and closing parentheses, similar to how it already tracked opening and closing brackets for character classes. When scanning the regexp and coming to `(?` not followed by `#`, scan for options, and use `x` and `i` to determine whether to turn on or off extended mode. For `:`, indicting only the current regexp section should have the extended mode switched, recurse with the extended mode set or unset. For `)`, indicating the remainder of the regexp (or current regexp portion if already recursing) should turn extended mode on or off, just change the extended mode flag and keep scanning. While testing this, I noticed that `a`, `d`, and `u` are accepted as options, in addition to `i`, `m`, and `x`, but I can't see where those options are documented. I'm not sure whether or not handling `a`, `d`, and `u` as options is a bug. Fixes [Bug #19379]
* bignum.c: rb_int_parse_cstr handle `0` stringsJean Boussier2023-01-301-0/+4
| | | | | | | [Bug #19390] We shouldn't check the string length when skipping zeros, as the string might only contains zero characters, resulting in an empty string.
* Skip OpenSSL::TestHMAC#test_dup when running with RHEL9Hiroshi SHIBATA2023-01-301-0/+3
|
* [ruby/stringio] [Bug #19389] Fix chomping with longer separatorNobuyoshi Nakada2023-01-281-0/+2
| | | | https://github.com/ruby/stringio/commit/eb322a9716
* [ruby/bigdecimal] Add truffleruby in CIBenoit Daloze2023-01-271-1/+5
| | | | https://github.com/ruby/bigdecimal/commit/5a25e26e08
* [ruby/openssl] Added CoreAssertionsHiroshi SHIBATA2023-01-271-1/+7
| | | | | | | https://github.com/ruby/openssl/commit/520601e11d This commits swtich to use ruby/ruby's envutil.rb instead of vendored in openssl repo.
* [ruby/openssl] Do not require test file in a forked process in testsAndrew Konchin2023-01-272-23/+15
| | | | https://github.com/ruby/openssl/commit/ae784673d7
* [rubygems/rubygems] Deprecate Gem::ListSamuel Giddins2023-01-261-8/+0
| | | | | | It is unused, we will remove it in the next major version https://github.com/rubygems/rubygems/commit/c3f6c27d6d
* Add tests for variables in `END` block shared with the toplevelNobuyoshi Nakada2023-01-241-0/+5
|
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2023-01-242-5/+5
| | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.56 to 0.9.58. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.56...v0.9.58) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2023-01-232-5/+5
| | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.56 to 0.9.58. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.56...v0.9.58) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* [ruby/psych] Fix RestrictedYAMLTree allowing the Symbol class should allow ↵Jean Boussier2023-01-231-2/+5
| | | | | | | | | | | | | | | | all symbols Ref: https://github.com/ruby/psych/pull/495 That's how it works for `safe_load`: ```ruby >> YAML.safe_load(':foo', permitted_classes: [Symbol]) => :foo ``` So `safe_dump` should mirror that. https://github.com/ruby/psych/commit/592a75a656
* Fix Integer#ceildiv to respect #coerce (#7118)Kouhei Yanagita2023-01-221-0/+4
| | | Fixes [Bug #19343]
* More coverage tests & specs. (#7171)Samuel Williams2023-01-223-0/+10
| | | | | * Add spec for eval and line coverage. * Add test for main file coverage.
* [ruby/reline] Add autoindent test for indent after bracket and newlinetompng2023-01-201-0/+12
| | | | https://github.com/ruby/reline/commit/3f3da7d0e2
* [rubygems/rubygems] Clean test outputNobuyoshi Nakada2023-01-201-2/+1
| | | | | | | | The output from the command is mixed in this test, even when successful. Use the output as a part of the message on failure instead. https://github.com/rubygems/rubygems/commit/960509a133
* [Feature #19314] Add new arguments of String#bytespliceShugo Maeda2023-01-201-27/+71
| | | | | | | bytesplice(index, length, str, str_index, str_length) -> string bytesplice(range, str, str_range) -> string In these forms, the content of +self+ is replaced by str.byteslice(str_index, str_length) or str.byteslice(str_range); however the substring of +str+ is not allocated as a new string.
* [ci skip] Add ticket label to testPeter Zhu2023-01-191-1/+1
|
* don't allow setting class variable on module that's frozen [Bug #19341]lukeg2023-01-191-0/+15
|
* String#bytesplice should return selfShugo Maeda2023-01-191-1/+1
| | | | | | | | In Feature #19314, we concluded that the return value of String#bytesplice should be changed from the source string to the receiver, because the source string is useless and confusing when extra arguments are added. This change should be included in Ruby 3.2.1.
* Test some missing coverage too. (#7041)Samuel Williams2023-01-191-5/+7
|
* [ruby/reline] Add scrollbar scroll-to-bottom test and fix existing scrollbar ↵tompng2023-01-181-10/+36
| | | | | | rendeing test https://github.com/ruby/reline/commit/268e02b155
* [ruby/reline] multiline_repl do not need to depend on RubyLextomoya ishida2023-01-183-22/+50
| | | | | | | | (https://github.com/ruby/reline/pull/502) * multiline_repl do not need to depend on RubyLex * Add auto indent test
* Change ArgumentError message when Comparable#clamp receives min value higher ↵Kaíque Kandy Koga2023-01-171-2/+2
| | | | than max value
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2023-01-172-5/+5
| | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.54 to 0.9.56. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.54...v0.9.56) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* Fix crash when defining ivars on special constantsPeter Zhu2023-01-171-0/+6
| | | | [Bug #19339]
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2023-01-172-5/+5
| | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.54 to 0.9.56. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.54...v0.9.56) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* [Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)Nobuyoshi Nakada2023-01-152-5/+24
| | | Also `Numeric#remainder` should.
* [ruby/reline] Correspond to refactored RubyLexHASUMI Hitoshi2023-01-141-8/+6
| | | | | | | | | | (https://github.com/ruby/reline/pull/498) * Correspond to refactored RubyLex ref: https://github.com/ruby/irb/pull/503 * Fix test_yamatanooroti
* [ruby/irb] Store context in RubyLexStan Lo2023-01-141-14/+17
| | | | | | | | | | | | | | | | | | Some background for this refactor: 1. Through a RubyLex instance's lifetime, the context passed to its methods should be the same. Given that `Context` is only initialised in `Irb#initialize`, this should be true. 2. When `RubyLex` is initialised, the context object should be accessible. This is also true in all 3 of `RubyLex.new`'s invocations. With the above observations, we should be able to store the context in `RubyLex` as an instance variable. And doing so will make `RubyLex`'s instance methods easier to use and maintain. https://github.com/ruby/irb/commit/5c8d3df2df
* Remove MIN_PRE_ALLOC_SIZE from Strings.Matt Valentine-House2023-01-131-0/+21
| | | | | This optimisation is no longer helpful now that we use VWA to allocate strings in larger size pools where they can be embedded.
* [ruby/error_highlight] Identify which node in `Foo::Bar::Baz` causes a NameErrorYusuke Endoh2023-01-131-0/+48
| | | | | | | | | | | | | In Ruby 3.2 or later, a nested constant access like `Foo::Bar::Baz` is compiled to one instruction by the optimization https://github.com/ruby/ruby/pull/6187 We try to spot which sub-node caues a NameError in question based on the constant name. We will give up if the same constant name is accessed in a nested access (`Foo::Foo`). Fixes https://github.com/ruby/error_highlight/pull/31 https://github.com/ruby/error_highlight/commit/0a4db7da0a
* Skip time-related assertions on /dev/nullNobuyoshi Nakada2023-01-131-3/+6
|
* Do not use VM stack for splat arg on cfuncKoichi Sasada2023-01-131-0/+84
| | | | | | | | | | | | | | On the cfunc methods, if a splat argument is given, all array elements are expanded on the VM stack and it can cause SystemStackError. The idea to avoid it is making a hidden array to contain all parameters and use this array as an argv. This patch is reviesed version of https://github.com/ruby/ruby/pull/6816 The main change is all changes are closed around calling cfunc logic. Fixes [Bug #4040] Co-authored-by: Jeremy Evans <code@jeremyevans.net>
* [ruby/irb] Avoid calling private methods on the main objectStan Lo2023-01-121-0/+13
| | | | | | | | | | | | (https://github.com/ruby/irb/pull/498) When the main object is frozen, `IRB` wraps a `SimpleDelegator` around it. But because `SimpleDelegator` doesn't delegate private methods, methods like `require_relative` or `const_get` would cause error, which are needed for lazily loading commands. This commit works around this limitation by avoiding those private method calls when setting up command execution.
* [ruby/mutex_m] Avoid anonymous evalJean Boussier2023-01-121-0/+21
| | | | | | It makes it hard to locate code when profiling etc. https://github.com/ruby/mutex_m/commit/8760ab19ec
* [ruby/reline] Pass unmodifined lines(that does not include escapetomoya ishida2023-01-122-0/+25
| | | | | | | | | sequence) to check_multiline_prompt (https://github.com/ruby/reline/pull/458) * pass unmodified lines to check_multiline_prompt * Add test to check that output modified by output_modifier_proc is not passed to prompt_proc
* [ruby/racc] Get rid of anonymous eval callsJean Boussier2023-01-122-4/+4
| | | | | | | Things declared in anonymous eval are always annoying to locate. (profilers, etc) https://github.com/ruby/racc/commit/f304205256
* [ruby/racc] Make racc Ractor compatibleMasataka Pocke Kuwabara2023-01-1220-13/+53
| | | | https://github.com/ruby/racc/commit/1948de9d1d