summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-02-22[Feature #18249] Implement ABI checkingPeter Zhu
Header file include/ruby/internal/abi.h contains RUBY_ABI_VERSION which is the ABI version. This value should be bumped whenever an ABI incompatible change is introduced. When loading dynamic libraries, Ruby will compare its own `ruby_abi_version` and the `ruby_abi_version` of the loaded library. If these two values don't match it will raise a `LoadError`. This feature can also be turned off by setting the environment variable `RUBY_RUBY_ABI_CHECK=0`. This feature will prevent cases where previously installed native gems fail in unexpected ways due to incompatibility of changes in header files. This will force the developer to recompile their gems to use the same header files as the built Ruby. In Ruby, the ABI version is exposed through `RbConfig::CONFIG["ruby_abi_version"]`. Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-22[ruby/reline] Fix support for emacs-ctlx and emacs-meta keymapsTim Pope
The existing implementation, given the below .inputrc, erroneously creates a "C-v" key binding: set keymap emacs-ctlx "\C-v": "[C-x C-v was pressed]" This fixes it to instead create a "C-x C-v" keybinding. https://github.com/ruby/reline/commit/719f52d231
2022-02-22[rubygems/rubygems] Resolve cleaned-up error with temporary gemhomeHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/623162ad2b
2022-02-22Add a test for Exception#detailed_messageYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22test/ruby/test_rubyoptions.rb: Make it pass on WindowsYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-22Do not escape error messageYusuke Endoh
[Feature #18367] Notes: Merged: https://github.com/ruby/ruby/pull/5516
2022-02-19Add String#byteindex, String#byterindex, and MatchData#byteoffset (#5518)Shugo Maeda
* Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110] Co-authored-by: NARUSE, Yui <naruse@airemix.jp> Notes: Merged-By: shugo <shugo@ruby-lang.org>
2022-02-19Find pattern is no longer experimental [Feature #18585]Kazuki Tsujimoto
2022-02-18Make Set a builtin feature [Feature #16989]Akinori MUSHA
Notes: Merged: https://github.com/ruby/ruby/pull/5563
2022-02-17Add Thread.each_caller_locationJeremy Evans
This method takes a block and yields Thread::Backtrace::Location objects to the block. It does not take arguments, and always starts at the default frame that caller_locations would start at. Implements [Feature #16663] Notes: Merged: https://github.com/ruby/ruby/pull/5445
2022-02-17exclude name must be Regexp or SymbolKazuhiro NISHIYAMA
https://github.com/ruby/ruby/blob/fdf0f8d81487560f5837dc7e3888a96f7c2b4ec9/tool/lib/test/unit.rb#L1273-L1290
2022-02-13Exclude TestThread#test_signal_at_join on FreeBSD 13 for now [ci skip]Nobuyoshi Nakada
2022-02-12[ruby/rdoc] Load YAML library for each testNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/a93e1bcd68
2022-02-12[ruby/rdoc] Dump plain objects as `RDoc::Options`Nobuyoshi Nakada
So that the generated `.rdoc_options` file is loadable. https://github.com/ruby/rdoc/commit/6cf6e1647b
2022-02-12[ruby/rdoc] Fix a test method nameNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/8166b84cf3
2022-02-12[ruby/rdoc] Relative loading for easier development ↵Ulysse Buonomo
(https://github.com/ruby/rdoc/pull/821) This patch makes sure we only load relative code. Hence when coding or testing rdoc, we'll be sure to always be using the correct code. Discussion started at https://github.com/ruby/rdoc/pull/817. Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com> https://github.com/ruby/rdoc/commit/aa41bd48eb Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-02-12test/ruby/test_exception.rb: prevent "assigned but unused variable"Yusuke Endoh
2022-02-10[ruby/ipaddr] Fix exception calling `to_range' after `freeze'Espartaco Palma
https://github.com/ruby/ipaddr/commit/77fe1fca0a
2022-02-10[ruby/ipaddr] Ipaddr#native must also coerce `@mask_addr`Jean Boussier
Before it would be left as an IPv6 mask causing `to_range` to fail. ``` >> IPAddr.new("::2").native.to_range /opt/rubies/3.0.3/lib/ruby/3.0.0/ipaddr.rb:479:in `set': invalid address (IPAddr::InvalidAddressError) ``` https://github.com/ruby/ipaddr/commit/af485192f3
2022-02-09Fix Range#include? for beginless exclusive string rangesJeremy Evans
Previously, include? would return true for the end of the range, when it should return false because the range is exclusive. Research and Analysis by Victor Shepelev. Fixes [Bug #18577] Notes: Merged: https://github.com/ruby/ruby/pull/5541
2022-02-09objspace: Hide identhash containing internal objsJohn Hawthorn
Inside ObjectSpace.reachable_objects_from we keep an internal identhash in order to de-duplicate reachable objects when wrapping them as InternalObject. Previously this hash was not hidden, making it possible to leak references to those internal objects to Ruby if using ObjectSpace.each_object. This commit solves this by hiding the hash. To simplify collection of values, we instead now just use the hash as a set of visited objects, and collect an Array (not hidden) of values to be returned. Notes: Merged: https://github.com/ruby/ruby/pull/5542
2022-02-10st.c: Do not clear entries_bound when calling Hash#shift for empty hashYusuke Endoh
tab->entries_bound is used to check if the bins are full in rebuild_table_if_necessary. Hash#shift against an empty hash assigned 0 to tab->entries_bound, but didn't clear the bins. Thus, the table is not rebuilt even when the bins are full. Attempting to add a new element into full-bin hash gets stuck. This change stops clearing tab->entries_bound in Hash#shift. [Bug #18578] Notes: Merged: https://github.com/ruby/ruby/pull/5539
2022-02-09[ruby/rdoc] Get rid of ruby-mode.el confusionsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/63fac51198
2022-02-09[ruby/rdoc] Allow cross references to negation operator methodNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/69cafb213a
2022-02-09[ruby/rdoc] Allow cross references to logical operator methodsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/17c0da304d
2022-02-09[ruby/rdoc] Skip parentheses on singleton class declarationSoutaro Matsumoto
https://github.com/ruby/rdoc/commit/b6c6d4f978
2022-02-09[ruby/rdoc] Allow cross references to backtick methodNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/52c33157f1
2022-02-09[ruby/rdoc] Allow cross references to operator methodsNobuyoshi Nakada
Make operator methods, e.g., `Regexp#=~`, `Integer#<=>`, cross reference targets. https://github.com/ruby/rdoc/commit/5d332a4128
2022-02-09[ruby/rdoc] Support all struct definition functionsNobuyoshi Nakada
Currently only `rb_struct_define_without_accessor` is supported by https://github.com/ruby/rdoc/pull/73. We should support other three functions too. https://github.com/ruby/rdoc/commit/d42288f06c
2022-02-05Fix TAG_THROW through require [Bug #18562]John Hawthorn
Previously this was being incorrectly swapped with TAG_RAISE in the next line. This would end up checking the T_IMEMO throw_data to the exception handling (which calls Module#===). This happened to not break existing tests because Module#=== returned false when klass is NULL. This commit handles throw from require correctly by jumping to the tag retaining the TAG_THROW state. Notes: Merged: https://github.com/ruby/ruby/pull/5513
2022-02-03Add the size pool slot size to the output of ObjectSpace.dump/dump_allMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/5520
2022-02-03Move total_freed_pages to size poolPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5523
2022-02-03Move total_allocated_pages to size poolPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5523
2022-02-03[ruby/net-http] Do not set SNI hostname if connecting to IP addressJeremy Evans
RFC 6066, section 3, explicitly disallows the use of an IP address as an SNI server name. So check if the connection is being made to an IP address using the resolv regexps, and do not set an SNI hostname in that case. Recent changes to LibreSSL make it more strictly follow RFC 6066, resulting an s.hostname= raising an error if passed an IP address. When such verions of LibreSSL are used, this change not only fixes the net/http tests, it also fixes tests for webrick and open-uri, which both make SSL connections to 127.0.0.1 using net/http in their tests. Avoid warning in the openssl extension by unsetting @ssl_context.verify_hostname if connecting to an IP address. Make changes so that the post_connection_check still happens when connecting to an IP address, which is necessary to keep checking that the certificate returned includes the IP address, which one of the tests depends on. Revert the previous change that modified the regexp used for checking the error message. https://github.com/ruby/net-http/commit/fa68e64bee
2022-02-02Decouple GC slot sizes from RVALUEPeter Zhu
Add a new macro BASE_SLOT_SIZE that determines the slot size. For Variable Width Allocation (compiled with USE_RVARGC=1), all slot sizes are powers-of-2 multiples of BASE_SLOT_SIZE. For USE_RVARGC=0, BASE_SLOT_SIZE is set to sizeof(RVALUE). Notes: Merged: https://github.com/ruby/ruby/pull/5517
2022-02-01Restore workaround for test_rubygems.rb, It still fails with chkbuild ↵Hiroshi SHIBATA
encironment
2022-02-01Sync latest Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/5512
2022-01-31pend some tests while using to_binaryKoichi Sasada
ISeqs from ISeq#to_binary/load do not support `keep_script_lines` now so some tests should be pending tests with `RUBY_ISEQ_DUMP_DEBUG=to_binary` Notes: Merged: https://github.com/ruby/ruby/pull/5508
2022-01-29Ignore warnings at reading debug info for nowNobuyoshi Nakada
Something seems changed on FreeBSD 13.
2022-01-29mkmf: pkg_config accepts multiple optionsMike Dalessio
Notes: Merged: https://github.com/ruby/ruby/pull/5436
2022-01-29test: backfill coverage for MakeMakefile.pkg_configMike Dalessio
Notes: Merged: https://github.com/ruby/ruby/pull/5436
2022-01-28Remove assert_equal that will never be runPeter Zhu
`@s1.set_len(3)` will raise so the `assert_equal` will never be ran.
2022-01-27Fix memory leak at the same named alias [Bug #18516]Nobuyoshi Nakada
When aliasing a method to the same name method, set a separate bit flag on that method definition, instead of the reference count increment. Although this kind of alias has no actual effect at runtime, is used as the hack to suppress the method re-definition warning. Notes: Merged: https://github.com/ruby/ruby/pull/5493
2022-01-27An alias can suppress method redefinition warningNobuyoshi Nakada
2022-01-27[ruby/logger] Fix log rotation inter-process lock failed.Jesse Chavez
Issue only occurs in JRuby 9.3.0.0 and Windows and the full console output is: log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process. log writing failed. closed stream log writing failed. closed stream ... https://github.com/ruby/logger/commit/19fc734638
2022-01-24[wasm] Disallow compactionPeter Zhu
WebAssembly doesn't support signals so we can't use read barriers so we can't use compaction. Notes: Merged: https://github.com/ruby/ruby/pull/5475
2022-01-24[ruby/bigdecimal] Fix the maximum precision of the quotientKenta Murata
Fixes https://github.com/ruby/bigdecimal/pull/220 https://github.com/ruby/bigdecimal/commit/127a1b5a31
2022-01-24[ruby/bigdecimal] Fix typoKenta Murata
https://github.com/ruby/bigdecimal/commit/79c09b4dac
2022-01-22[ruby/psych] Add strict_integer option to parse numbers with commas as stringsSeth Boyles
Authored-by: Seth Boyles <sethboyles@gmail.com> https://github.com/ruby/psych/commit/75bebb37b8
2022-01-19Do not create core file if it is intentional abortKoichi Sasada
Two tests abort intentionally and they create core files if possible. In these case, we don't need to see core files so disable by `"Process.setrlimit(Process::RLIMIT_CORE, 0)` for those cases. Notes: Merged: https://github.com/ruby/ruby/pull/5466