summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-09-13[ruby/yarp] Fix associativity for a couple of operatorsKevin Newton
https://github.com/ruby/yarp/commit/820774976d
2023-09-13[ruby/yarp] Better handle invalid gvar writesKevin Newton
https://github.com/ruby/yarp/commit/eaaebc17c8
2023-09-13[ruby/yarp] Mark empty flags as well as locations and blocksNobuyoshi Nakada
https://github.com/ruby/yarp/commit/b74ce35379
2023-09-13math.c: Fix Math.log against huge bignum [Bug #19878]Yusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/8429
2023-09-13Fixup 1851824b1c7b816e41b567b5310bb18ab6f9ff7aHiroshi SHIBATA
2023-09-13[flori/json] alias_method is private on Ruby 2.3 and 2.4Hiroshi SHIBATA
https://github.com/flori/json/commit/573ef94bc5
2023-09-13[Bug #19872] Refine TestRequireLibNobuyoshi Nakada
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.
2023-09-13Suppress an unused variable warningNobuyoshi Nakada
2023-09-13[ruby/yarp] Handle parsing local variable singleton method definitionKevin Newton
https://github.com/ruby/yarp/commit/943204d56f
2023-09-13[Bug #19862] Skip compiled result of never reachable expressionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8381
2023-09-13[Bug #19754] Make `IO::Buffer#get_string` check `offset` range (#8016)Nobuyoshi Nakada
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-09-12[ruby/yarp] Split AliasNodeKevin Newton
Into AliasGlobalVariableNode and AliasMethodNode. These have different enough semantics that we feel comfortable splitting them up. https://github.com/ruby/yarp/commit/c1f3e6d344
2023-09-12Make Kernel#lambda raise when given non-literal blockAlan Wu
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> Notes: Merged: https://github.com/ruby/ruby/pull/8405
2023-09-12Ensure signaled processes at opening FIFO terminatedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8421
2023-09-12[ruby/yarp] Heredocs can create Interpolated(X)StringNodes orJemma Issroff
(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
2023-09-12[ruby/yarp] Move the post required parameters after the rest parameterBenoit Daloze
* See https://github.com/ruby/yarp/issues/1436 https://github.com/ruby/yarp/commit/6f4e9ff940
2023-09-11[ruby/yarp] Provide a flag for the integer baseKevin Newton
https://github.com/ruby/yarp/commit/45dd046b83
2023-09-11[ruby/yarp] Introduce MatchLastLineNode and InterpolatedMatchLastLineNodeKevin Newton
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
2023-09-11[ruby/yarp] Update pretty_print to use inspectKevin Newton
https://github.com/ruby/yarp/commit/c2b9b780c7
2023-09-11[rubygems/rubygems] Fixed false positive SymlinkError in symbolic link directorynegi0109
https://github.com/rubygems/rubygems/commit/58173ff2ea
2023-09-11[ruby/yarp] Mark flags as privateKevin Newton
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
2023-09-11[ruby/yarp] Update fixturesTim Morgan
https://github.com/ruby/yarp/commit/884f2ca8e4
2023-09-11[ruby/yarp] Add failing test for Regexp flagsTim Morgan
https://github.com/ruby/yarp/commit/16fe179c5f
2023-09-08[ruby/yarp] Move parse result mutations into their own filesKevin Newton
https://github.com/ruby/yarp/commit/3be8272fa2
2023-09-08[YARP] Implement compilation for RationalNodes, fix other num types (#8404)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-08[ruby/yarp] Add ParseResult#attach_comments! to tie comments to their locationsVinicius Stock
https://github.com/ruby/yarp/commit/ddc699156f Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
2023-09-08Fix weak_references count testMatt Valentine-House
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. Notes: Merged: https://github.com/ruby/ruby/pull/8402
2023-09-08[YARP] Implement compilation for Regex / InterpolatedRegex (#8396)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-08[YARP] Implement compilation for InterpolatedXStringNode (#8395)Jemma Issroff
* [YARP] Implemented compilation for InterpolatedXStringNode * Extract common function for interpolated nodes Notes: Merged-By: jemmaissroff
2023-09-08[ruby/yarp] Flatten multitarget into multiwriteKevin Newton
https://github.com/ruby/yarp/commit/1021dac372
2023-09-08[ruby/yarp] Multi target nodesKevin Newton
https://github.com/ruby/yarp/commit/fa53fe88e4
2023-09-07Rewrite Integer#times in Ruby (#8388)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2023-09-07[ruby/yarp] Extract error messages into diagnostic.c and use canonical ↵Mike Dalessio
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
2023-09-07[YARP] Miscellaneous small bug fixes (#8387)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-07[ruby/yarp] Introduce owned constantsKevin Newton
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
2023-09-07[ruby/yarp] Constants and def nodesKevin Newton
https://github.com/ruby/yarp/commit/6b2421ce1b
2023-09-07[ruby/yarp] Constants on rest parameter nodesKevin Newton
https://github.com/ruby/yarp/commit/a6fdb8aae9
2023-09-07[ruby/yarp] Constants on keyword rest parametersKevin Newton
https://github.com/ruby/yarp/commit/5e1a8fbc54
2023-09-07[ruby/yarp] Constants on keyword parametersKevin Newton
https://github.com/ruby/yarp/commit/d2d4f25a23
2023-09-07[ruby/yarp] Remove name constant from classes/modulesKevin Newton
https://github.com/ruby/yarp/commit/26105f0b58
2023-09-07[Bug #19549] Check for variables to be interpolatedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7615
2023-09-07Reduce number of iterations in `TestFiberScheduler#test_autoload`. (#8391)Samuel Williams
`ppc64le` appears to be struggling with this test due to timeout. Let's see if reducing the number of iterations can help improve the test performance. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-09-06[ruby/yarp] Consider source encoding for `slice`Vinicius Stock
https://github.com/ruby/yarp/commit/8f59fc27cd Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
2023-09-06[ruby/yarp] Fix `Location#end_column`Andy Waite
https://github.com/ruby/yarp/commit/00e4711026
2023-09-06Fix crash in WeakMap during compactionPeter Zhu
WeakMap can crash during compaction because the st_insert could allocate memory.
2023-09-06[ruby/yarp] Constant on block parameter nodeKevin Newton
https://github.com/ruby/yarp/commit/2cd9a67150
2023-09-06Try to fix flaky test_warmup_frees_pagesPeter Zhu
This test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2750]: <202> expected but was <203>. ```
2023-09-06[ruby/yarp] Constants on classes and modulesKevin Newton
(https://github.com/ruby/yarp/pull/1409) https://github.com/ruby/yarp/commit/0a11ec579f
2023-09-06[ruby/yarp] Fix assert_raises in YARPKevin Newton
https://github.com/ruby/yarp/commit/8f8f3530aa
2023-09-06[ruby/yarp] Temporarily add name_constant to replace name on ↵Kevin Newton
ClassNode/ModuleNode https://github.com/ruby/yarp/commit/8f87686e9c