aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/yarp] Fix multi target parentheses locationsKevin Newton2023-09-143-10/+12
| | | | https://github.com/ruby/yarp/commit/7f71527522
* [ruby/yarp] Reject invalid call-operator-writeKevin Newton2023-09-141-1/+8
| | | | https://github.com/ruby/yarp/commit/d3a852dac2
* [ruby/yarp] Add a frozen string flagKevin Newton2023-09-14171-3/+622
| | | | https://github.com/ruby/yarp/commit/09248a1f9e
* [Bug #19877] Fix flip-flop in blockNobuyoshi Nakada2023-09-151-0/+15
|
* [Bug #19877] Named captures should take place from regexps in blockNobuyoshi Nakada2023-09-151-0/+14
|
* [Bug #19877] Literals cannot have singleton methods even in blocksNobuyoshi Nakada2023-09-151-5/+20
|
* [ruby/yarp] Fix up unary minus precedenceKevin Newton2023-09-142-52/+94
| | | | https://github.com/ruby/yarp/commit/6be28eeed0
* [ruby/yarp] Handle concat character literal and stringKevin Newton2023-09-142-7/+22
| | | | https://github.com/ruby/yarp/commit/fb141b8d07
* [ruby/yarp] Extract out heredoc parsing into parse_stringsKevin Newton2023-09-149-14/+14
| | | | https://github.com/ruby/yarp/commit/c5a1094988
* [ruby/yarp] Handle invalid operator write on fcallKevin Newton2023-09-141-0/+7
| | | | https://github.com/ruby/yarp/commit/22c800eab1
* Fix `io_buffer_get_string` default length computation. (#8427)Samuel Williams2023-09-141-2/+6
| | | | | | | | * Fix `io_buffer_get_string` default length computation. When an offset bigger than the size is given, the resulting length will be computed incorrectly. Raise an argument error in this case. * Validate all arguments.
* [Bug #19868] Deprecate `Process::Status#&` and `Process::Status#>>`Nobuyoshi Nakada2023-09-141-2/+2
|
* [Bug #19868] Suggest other Process::Status method for `&` and `>>`Nobuyoshi Nakada2023-09-141-2/+6
| | | | | | | | `Process::Status#&` and `Process::Status#>>` are provided only for the backward compatibility with older Ruby than 1.8 where `$?` was a `Fixnum`, and the knowledge about internals of system dependent macros is necessary to use them. Modern programs and libraries should not need these methods.
* Negative value to Process::Status method for compatibilityNobuyoshi Nakada2023-09-141-0/+3
|
* [ruby/yarp] Fix associativity for a couple of operatorsKevin Newton2023-09-132-23/+78
| | | | https://github.com/ruby/yarp/commit/820774976d
* [ruby/yarp] Better handle invalid gvar writesKevin Newton2023-09-131-0/+6
| | | | https://github.com/ruby/yarp/commit/eaaebc17c8
* [ruby/yarp] Mark empty flags as well as locations and blocksNobuyoshi Nakada2023-09-13460-1520/+1520
| | | | https://github.com/ruby/yarp/commit/b74ce35379
* math.c: Fix Math.log against huge bignum [Bug #19878]Yusuke Endoh2023-09-131-0/+1
|
* Fixup 1851824b1c7b816e41b567b5310bb18ab6f9ff7aHiroshi SHIBATA2023-09-131-2/+2
|
* [flori/json] alias_method is private on Ruby 2.3 and 2.4Hiroshi SHIBATA2023-09-131-2/+2
| | | | https://github.com/flori/json/commit/573ef94bc5
* [Bug #19872] Refine TestRequireLibNobuyoshi Nakada2023-09-131-14/+15
| | | | | | Always test only the scripts just under “lib", and just under child directories which has not the same name script in the upper level; instead of random sampling from whole libraries.
* Suppress an unused variable warningNobuyoshi Nakada2023-09-131-1/+1
|
* [ruby/yarp] Handle parsing local variable singleton method definitionKevin Newton2023-09-132-31/+58
| | | | https://github.com/ruby/yarp/commit/943204d56f
* [Bug #19862] Skip compiled result of never reachable expressionNobuyoshi Nakada2023-09-131-0/+11
|
* [Bug #19754] Make `IO::Buffer#get_string` check `offset` range (#8016)Nobuyoshi Nakada2023-09-131-0/+8
|
* [ruby/yarp] Split AliasNodeKevin Newton2023-09-128-23/+27
| | | | | | | Into AliasGlobalVariableNode and AliasMethodNode. These have different enough semantics that we feel comfortable splitting them up. https://github.com/ruby/yarp/commit/c1f3e6d344
* Make Kernel#lambda raise when given non-literal blockAlan Wu2023-09-122-63/+10
| | | | | | | | | | | | | | | | | Previously, Kernel#lambda returned a non-lambda proc when given a non-literal block and issued a warning under the `:deprecated` category. With this change, Kernel#lambda will always return a lambda proc, if it returns without raising. Due to interactions with block passing optimizations, we previously had two separate code paths for detecting whether Kernel#lambda got a literal block. This change allows us to remove one path, the hack done with rb_control_frame_t::block_code introduced in 85a337f for supporting situations where Kernel#lambda returned a non-lambda proc. [Feature #19777] Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* Ensure signaled processes at opening FIFO terminatedNobuyoshi Nakada2023-09-121-0/+14
|
* [ruby/yarp] Heredocs can create Interpolated(X)StringNodes orJemma Issroff2023-09-1257-870/+480
| | | | | | | | | | | | (X)StringNodes (https://github.com/ruby/yarp/pull/1427) Prior to this commit, heredocs were automatically InterpolatedNodes regardless of whether there was actually interpolation. With this commit, heredocs are only interpolate if there is actually interpolation https://github.com/ruby/yarp/commit/e9f436128b
* [ruby/yarp] Move the post required parameters after the rest parameterBenoit Daloze2023-09-12179-431/+431
| | | | | | * See https://github.com/ruby/yarp/issues/1436 https://github.com/ruby/yarp/commit/6f4e9ff940
* [ruby/yarp] Provide a flag for the integer baseKevin Newton2023-09-11333-4/+1082
| | | | https://github.com/ruby/yarp/commit/45dd046b83
* [ruby/yarp] Introduce MatchLastLineNode and InterpolatedMatchLastLineNodeKevin Newton2023-09-113-3/+11
| | | | | | | | | | These are replacements for regular expressions when they are used alone as the predicate of a conditional. That's because they are significantly different from a regular expression because they are not evaluated for truthyness, but instead evaluated as a match against the last line read by an IO object. https://github.com/ruby/yarp/commit/0f1c7780e8
* [ruby/yarp] Update pretty_print to use inspectKevin Newton2023-09-11911-58560/+75466
| | | | https://github.com/ruby/yarp/commit/c2b9b780c7
* [rubygems/rubygems] Fixed false positive SymlinkError in symbolic link directorynegi01092023-09-111-0/+26
| | | | https://github.com/rubygems/rubygems/commit/58173ff2ea
* [ruby/yarp] Mark flags as privateKevin Newton2023-09-111-6/+17
| | | | | | | | | | | | | | | | | The flags integer is an implementation detail. We want people to use the query methods to access the individual fields so we are freed from having to maintain a specific order. As such, this commit changes the Ruby API to mark all flags fields as private attr_readers. The only one that has a clear use case is returning the set of options given to regular expressions, to mirror the Regexp#options API. So, to support this use case, this commit introduces RegularExpressionNode#options and InterpolatedRegularExpressionNode#options. These APIs provide back the same integer so that they can be used interchangeably. https://github.com/ruby/yarp/commit/4e6d5dd99f
* [ruby/yarp] Update fixturesTim Morgan2023-09-115-11/+11
| | | | https://github.com/ruby/yarp/commit/884f2ca8e4
* [ruby/yarp] Add failing test for Regexp flagsTim Morgan2023-09-111-0/+25
| | | | https://github.com/ruby/yarp/commit/16fe179c5f
* [ruby/yarp] Move parse result mutations into their own filesKevin Newton2023-09-081-1/+1
| | | | https://github.com/ruby/yarp/commit/3be8272fa2
* [YARP] Implement compilation for RationalNodes, fix other num types (#8404)Jemma Issroff2023-09-081-11/+16
|
* [ruby/yarp] Add ParseResult#attach_comments! to tie comments to their locationsVinicius Stock2023-09-081-0/+24
| | | | | | https://github.com/ruby/yarp/commit/ddc699156f Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
* Fix weak_references count testMatt Valentine-House2023-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | This test creates a lot of Objects held in an array, and a set of weak references to them using WeakMap. It then clears the array and frees it and asserts that all the weak references to it are also gone. This test is failing because one of the dummy objects in our weakmap is ending up on the stack, and so is being marked, even though we thought that we'd removed the only reference to it. This behaviour has changed since this commit: https://github.com/ruby/ruby/commit/5b5ae3d9e064e17e2a7d8d21d739fcc62ae1075c which rewrites `Integer#times` from C into Ruby. This change is somehow causing the last object we append to our array to consistently end up on the stack during GC. This commit fixes the specific weakmap test by using an enumerator and each, instead of `Integer#times`, and thus avoids having our last object created end up on the stack.
* [YARP] Implement compilation for Regex / InterpolatedRegex (#8396)Jemma Issroff2023-09-081-0/+10
|
* [YARP] Implement compilation for InterpolatedXStringNode (#8395)Jemma Issroff2023-09-081-0/+5
| | | | | * [YARP] Implemented compilation for InterpolatedXStringNode * Extract common function for interpolated nodes
* [ruby/yarp] Flatten multitarget into multiwriteKevin Newton2023-09-0840-779/+625
| | | | https://github.com/ruby/yarp/commit/1021dac372
* [ruby/yarp] Multi target nodesKevin Newton2023-09-0844-802/+877
| | | | https://github.com/ruby/yarp/commit/fa53fe88e4
* Rewrite Integer#times in Ruby (#8388)Takashi Kokubun2023-09-073-18/+29
|
* [ruby/yarp] Extract error messages into diagnostic.c and use canonical ↵Mike Dalessio2023-09-071-108/+108
| | | | | | | | | | | | | | | | | | message IDs The parser now passes around `yp_diagnostic_id_t` for diagnostic messages instead of character strings, and we rely on the function `diagnostic_message()` to resolve that to a string. In addition, many messages were edited so that the parser expresses coordinate ideas in similar form [1] using consistent voice and typographic conventions. Closes https://github.com/ruby/yarp/pull/1379, and makes progress on #941. [1] Strunk & White rule 19 https://github.com/ruby/yarp/commit/0b6dd85bf1
* [YARP] Miscellaneous small bug fixes (#8387)Jemma Issroff2023-09-071-0/+4
|
* [ruby/yarp] Introduce owned constantsKevin Newton2023-09-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, constants in the constant pool were assumed to be slices of the source string. This works in _almost_ all cases. There are times, however, when a string needs to be synthesized. This can occur when passing in locals that need to be scoped through eval, or when generating method names like `foo=`. After this commit, there is a single bit `owned` boolean on constants in the pool that indicates whether or not it is a slice of the source string. If it is not, it is assumed to be allocated memory that should be freed by the constant pool when the constant pool is freed. When serializing, the most significant bit in the location of the contents of the constant indicates whether or not it is owned. When it is, instead of 4 bytes for the source offset and 4 bytes for the length it is instead 4 bytes for the buffer offset and 4 bytes the length. The contents of the owned constants are embedded into the buffer after the constant pool itself. https://github.com/ruby/yarp/commit/461c047365
* [ruby/yarp] Constants and def nodesKevin Newton2023-09-07114-0/+363
| | | | https://github.com/ruby/yarp/commit/6b2421ce1b