summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
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
2023-09-06[ruby/yarp] Introduce YARP::PatternKevin Newton
https://github.com/ruby/yarp/commit/2a12e9637b
2023-09-06[ruby/yarp] Add constants and constantsKevin Newton
https://github.com/ruby/yarp/commit/d7eaa89bc3
2023-09-06Use the test-unit-ruby-core gem for Test::Unit::CoreAssertionsKazuki Yamaguchi
test/lib/core_assertions.rb and its dependencies are now packaged in the gem test-unit-ruby-core. Let's use it instead.
2023-09-06[ruby/openssl] test/openssl/test_pkey_ec.rb: refactor tests for ↵Kazuki Yamaguchi
EC.builtin_curves Check that OpenSSL::PKey::EC.builtin_curves returns an array in the expected format. Similarly to OpenSSL::Cipher.ciphers, OpenSSL::PKey::EC.builtin_curves returns a list of known named curves rather than actually usable ones. https://github.com/ruby/openssl/issues/671 found that the list may include unapproved (and thus unusable) curves when the FIPS module is loaded. https://github.com/ruby/openssl/commit/c53cbabe00
2023-09-06[ruby/openssl] test/openssl/test_ossl.rb: relax assertion for error messagesKazuki Yamaguchi
The test case test_error_data utilizes the error message generated by X509V3_EXT_nconf_nid(). The next commit will use X509V3_EXT_nconf(), which generates a slightly different error message. Let's adapt the check to it. https://github.com/ruby/openssl/commit/9cdfa3a4d1
2023-09-06[ruby/openssl] x509ext: let X509::ExtensionFactory#create_ext take a dotted ↵Michael Richardson
OID string instead of looking of NIDs and then using X509V3_EXT_nconf_nid, instead just pass strings to X509V3_EXT_nconf, which has all the logic for processing dealing with generic extensions also process the oid through ln2nid() to retain compatibility. [rhe: tweaked commit message and added a test case] https://github.com/ruby/openssl/commit/9f15741331
2023-09-06[ruby/openssl] x509ext: test OpenSSL::X509::ExtensionFactory#create_ext with lnKazuki Yamaguchi
OpenSSL::X509::ExtensionFactory#create_ext and #create_extensions accepts both sn (short names) and ln (long names) for registered OIDs. This is different from the behavior of the openssl command-line utility which accepts only sn in openssl.cnf keys. Add a test case to check this. https://github.com/ruby/openssl/commit/91ae46c8d7
2023-09-06[ruby/openssl] Prefer String#unpack1Mau Magnaguagno
(https://github.com/ruby/openssl/pull/586) String#unpack1 avoids the intermediate array created by String#unpack for single elements, while also making a call to Array#first/[0] unnecessary. https://github.com/ruby/openssl/commit/8eb0715a42
2023-09-06[ruby/openssl] Remove OSSL_DEBUG compile-time optionKazuki Yamaguchi
Remove the OSSL_DEBUG flag and OpenSSL.mem_check_start which is only compiled when the flag is given. They are meant purely for development of Ruby/OpenSSL. OpenSSL.mem_check_start helped us find memory leak bugs in past, but it is no longer working with the recent OpenSSL versions. Let's just remove it now. https://github.com/ruby/openssl/commit/8c7a6a17e2
2023-09-05[YARP] Fix warning on compiling constant test (#8377)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-05[ruby/yarp] Flatten CallAndWriteNode, CallOrWriteNode, and CallOperatorWriteNodeKevin Newton
https://github.com/ruby/yarp/commit/8f26ffa0b2
2023-09-05[ruby/yarp] Introduce a BlockLocalVariableNodeKevin Newton
This is a tradeoff that I think is worth it. Right now we have a location list that tracks the location of each of the block locals. Instead, I'd like to make that a node list that has a proper node in each spot in the list. In doing so, we eliminate the need to have a location list at all, making it simpler on all of the various consumers as we have one fewer field type. There should be minimal memory implications here since this syntax is exceedingly rare. https://github.com/ruby/yarp/commit/04d329ddf0
2023-09-05Prevent "ambiguous first argument" warningsYusuke Endoh
``` /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:16: warning: ambiguous first argument; put parentheses or a space even after `+' operator /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:17: warning: ambiguous first argument; put parentheses or a space even after `-' operator /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:28: warning: ambiguous first argument; put parentheses or a space even after `+' operator /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/yarp/compiler_test.rb:29: warning: ambiguous first argument; put parentheses or a space even after `-' operator ``` http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20230905T063003Z.log.html.gz
2023-09-05Prevent a warning: method redefined; discarding old includedYusuke Endoh
``` [ 3463/25719] JSONGeneratorTest#test_string_ext_included_calls_super/home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/json/json_generator_test.rb:411: warning: method redefined; discarding old included /home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/json/json_generator_test.rb:399: warning: previous definition of included was here ``` http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20230905T063003Z.log.html.gz
2023-09-05[flori/json] Removed code for Ruby 1.8Hiroshi SHIBATA
https://github.com/flori/json/commit/7f9c29038d
2023-09-05Pattern matching has not been experimentalyui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/8360
2023-09-05[ruby/rdoc] Omit descriptions and parameter lists for methods defined in C ↵Jeremy Evans
not mentioned in call-seq This allows RDoc to better generate documentation for methods following the Ruby core documentation guide (which omits aliases in call-seq in most cases). This makes documentation for methods defined in C more similar to methods defined in Ruby. For methods defined in Ruby, the method description of the aliased method is already not used (you have to explicitly document the alias to use it). Internally, this adds AnyMethod#has_call_seq? and #skip_description?, and updates Darkfish to: * only show the method name if there is a call-seq for the method, but the call-seq omits the method * to omit the method description if the method is an alias or has aliases and has a call-seq that does not include the method See discussion in https://github.com/ruby/ruby/pull/7316 for details. https://github.com/ruby/rdoc/commit/e3688de49b
2023-09-05[ruby/rdoc] handle symbols declared with `%s`theo-squadracer
https://github.com/ruby/rdoc/commit/ed91c4b784
2023-09-04Add debug info for flaky test_warmup_frees_pagesPeter Zhu
This test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2751]: <0> expected but was <1>. ``` I'm not sure why, so add some debug info.
2023-09-04Revert "Don't reset line coverage for evaled code. (#8330)"Yusuke Endoh
This reverts commit 7e0f5df2f99693267d61636d23da47f79924e9d5. https://bugs.ruby-lang.org/issues/19857#note-7
2023-09-04Don't reset line coverage for evaled code. (#8330)Samuel Williams
* Add failing test. Notes: Merged-By: ioquatix <samuel@codeotaku.com>