summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-09-16Fix assertion failed in Complex.polar without NDEBUG (#3551)Kenta Murata
Fixes [Bug #17172]. Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-09-16Add a note at the top of the test schedulerBenoit Daloze
2020-09-16RUBY_ISEQ_DUMP_DEBUG=to_binary never kept the debug information for String ↵Benoit Daloze
literals * That is, for plain string literals, not interpolated. * The test below is very similar and uses the same check.
2020-09-16Revert "skip on RUBY_ISEQ_DUMP_DEBUG=to_binary"Benoit Daloze
This reverts commit 889bbbaf527372c5cc229b56dca9a2322e325f26.
2020-09-16skip on RUBY_ISEQ_DUMP_DEBUG=to_binaryKoichi Sasada
9b535f3ff7 does not support ISeq#to_binary. To make CI green, skip this test temporarily. Please fix this issue and revert this patch.
2020-09-16Use build_message on test_securerandom.rb (#3543)Hiroshi SHIBATA
* Revert "Revert "[ruby/securerandom] Use build_message instead of message for test-unit"" * [ruby/securerandom] Fixed the wrong usage of build_message Notes: Merged-By: hsbt <hsbt@ruby-lang.org>
2020-09-15Interpolated strings are no longer frozen with frozen-string-literal: trueBenoit Daloze
* Remove freezestring instruction since this was the only usage for it. * [Feature #17104] Notes: Merged: https://github.com/ruby/ruby/pull/3488
2020-09-15Revert "[ruby/securerandom] Use build_message instead of message for test-unit"Hiroshi SHIBATA
This reverts commit 7f9f5f5723cd723dee578b0681066c8393ee45d0.
2020-09-15[ruby/securerandom] Use build_message instead of message for test-unitHiroshi SHIBATA
https://github.com/ruby/securerandom/commit/826b877e83
2020-09-14[ruby/ostruct] Avoid self calling our public methods.Marc-Andre Lafortune
Found because `json` has a bad example in its test suite. This implementation still offers better encapsulation. Notes: Merged: https://github.com/ruby/ruby/pull/3541
2020-09-14[ruby/ostruct] Reinstate recent changesMarc-Andre Lafortune
This reverts commit 28e60b0045b5732bca11012d81a5223001faa6b2. Notes: Merged: https://github.com/ruby/ruby/pull/3541
2020-09-14Optimize Pathname#relative? / absolute?Marc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/2107
2020-09-14[ruby/ostruct] Revert recent changesMarc-Andre Lafortune
This reverts commit e026e186f4..12a2e32d43.
2020-09-14[ruby/ostruct] Add access to public instance methods in case they are overridenMarc-Andre Lafortune
2020-09-14[ruby/ostruct] Allow overriding public methodsMarc-Andre Lafortune
[Fixes https://bugs.ruby-lang.org/issues/15409]
2020-09-14[ruby/ostruct] Add really basic test that was missingMarc-Andre Lafortune
2020-09-14[ruby/ostruct] Revert "ostruct.rb: deferred accessors"Marc-Andre Lafortune
This reverts commits: dc38e99813 22c082fcfd b499e0f9ff 58e5876646 Add test for overriden private methods [Fixes https://bugs.ruby-lang.org/issues/12136]
2020-09-14[ruby/tmpdir] Warn when environment variables skipped (fixes #2)Nobuyoshi Nakada
https://github.com/ruby/tmpdir/commit/af7b020a89
2020-09-14[ruby/tmpdir] Test "not writable" caseNobuyoshi Nakada
https://github.com/ruby/tmpdir/commit/84684d80f9
2020-09-14[ruby/tmpdir] Test "not a directory" casesNobuyoshi Nakada
https://github.com/ruby/tmpdir/commit/f335f2c23e
2020-09-14[ruby/tmpdir] Test also TMP and TEMP environment variablesNobuyoshi Nakada
https://github.com/ruby/tmpdir/commit/414c00ebe6
2020-09-14[ruby/tmpdir] Prefer better failure messageNobuyoshi Nakada
https://github.com/ruby/tmpdir/commit/ac12877306
2020-09-14[ruby/zlib] Add Zlib::GzipReader.zcat for handling multiple gzip streams in ↵Jeremy Evans
gz file Most gzip tools support concatenated gz streams in a gz file. This offers a way to handle such gz files in Ruby. Fixes [Bug #9790] Fixes [Bug #11180] Fixes [Bug #14804] https://github.com/ruby/zlib/commit/e2ce56de7d
2020-09-14[ruby/net-smtp] Net::SMTP.start arguments are keyword argumentsTOMITA Masahiro
The helo argument is not important, but the helo argument must be specified to specify the user and secret arguments. If helo, user, secret, and authtype arguments are keyword arguments, it is not necessary to specify the helo argument. https://github.com/ruby/net-smtp/commit/269774deac
2020-09-14[ruby/net-smtp] TLS should not check the host name by default.TOMITA Masahiro
In tlsconnect(), the host name is checked when @ssl_context.verify_mode is not OpenSSL::SSL::VERIFY_NONE, but the verify_mode of @ssl_context generated by default is nil. https://github.com/ruby/net-smtp/commit/bde75a15b5
2020-09-14Add support for Queue & SizedQueue.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Add support for ConditionVariable.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Improve handling of urgent notification pipe.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Make Mutex per-Fiber instead of per-ThreadBenoit Daloze
* Enables Mutex to be used as synchronization between multiple Fibers of the same Thread. * With a Fiber scheduler we can yield to another Fiber on contended Mutex#lock instead of blocking the entire thread. * This also makes the behavior of Mutex consistent across CRuby, JRuby and TruffleRuby. * [Feature #16792] Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Rename `Fiber{}` to `Fiber.schedule{}`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Standardised scheduler interface.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Simplify bitmasks for IO events.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14[ruby/irb] Omit output if first line of multiline is too longaycabta
https://github.com/ruby/irb/commit/0feeae38c5
2020-09-14[ruby/irb] Add OMIT_ON_ASSIGNMENTaycabta
Omit the results evaluated at assignment if they are too long. The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand, so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by default. The result is displayed on assignment, but it will always be short and within one line of the screen. https://github.com/ruby/irb/commit/c5ea79d5ce
2020-09-12[ruby/reline] Treat prompt correctly when Reline.prompt_proc isn't setaycabta
https://github.com/ruby/reline/commit/9c9ba0eff3
2020-09-12[ruby/reline] Move cursor to currect vertical pos after rendering a logical lineaycabta
https://github.com/ruby/reline/commit/9b932df544
2020-09-11Let String#slice! return nil (#3533)Soutaro Matsumoto
Returns `nil` instead of an empty string when non-integer number is given (to make it 2.7 compatible). Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2020-09-09Optimize ObjectSpace.dump_allJean Boussier
The two main optimization are: - buffer writes for improved performance - avoid formatting functions when possible ``` | |compare-ruby|built-ruby| |:------------------|-----------:|---------:| |dump_all_string | 1.038| 195.925| | | -| 188.77x| |dump_all_file | 33.453| 139.645| | | -| 4.17x| |dump_all_dev_null | 44.030| 278.552| | | -| 6.33x| ``` Notes: Merged: https://github.com/ruby/ruby/pull/3420
2020-09-09Add a :since option to dump_allJean Boussier
This is useful to see what a block of code allocated, e.g. ``` GC.start GC.disable ObjectSpace.trace_object_allocations do # run some code end gc_gen = GC.count allocations = ObjectSpace.dump_all(output: :file, since: gc_gen) GC.enable GC.start retentions = ObjectSpace.dump_all(output: :file, since: gc_gen) ``` Notes: Merged: https://github.com/ruby/ruby/pull/3368
2020-09-09Revert the related commits about `Tempfile.open` change.Hiroshi SHIBATA
Start with https://github.com/ruby/ruby/commit/fa21985a7a2f8f52a8bd82bd12a724e9dca74934 to https://github.com/ruby/ruby/commit/d7492a0be885ea9f2b9f71e3e95582f9a859c439
2020-09-08Workaroud for macOS Big Sur(11.0)Hiroshi SHIBATA
2020-09-08libSystem.dylib is also symlink. Use libSystem.B.dylibHiroshi SHIBATA
2020-09-08Use libSystem.dylib instead of libm.dylib and libc.dylibHiroshi SHIBATA
Because macOS 11.0(Big Sur) was removed libc and libm from `/usr/lib`.
2020-09-07Added `get_real` interfaceNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3024
2020-09-07separate rb_random_tNobuyoshi Nakada
* random.c: separate abstract rb_random_t and rb_random_mt_t for Mersenne Twister implementation. * include/ruby/random.h: the interface for extensions of Random class. * DLL imported symbol reference is not constant on Windows. * check if properly initialized. Notes: Merged: https://github.com/ruby/ruby/pull/3024
2020-09-06Make it possible to dump and load an exception objectYusuke Endoh
A backtrace object in an exception had never supported marshalling correctly: `Marshal.load(Marshal.dump(exc)).backtrace_locations` dumped core. An Exception object has two hidden instance varibles for backtrace data: one is "bt", which has an Array of Strings, and the other is "bt_locations", which has an Array of Thread::Backtrace::Locations. However, Exception's dump outputs data so that the two variables are the same Array of Strings. Thus, "bt_locations" had a wrong-type object. For the compatibility, it is difficult to change the dump format. This changeset fixes the issue by ignoring data for "bt_locations" at the loading phase if "bt_locations" refers to the same object as "bt". Future work: Exception's dump should output "bt_locations" appropriately. https://bugs.ruby-lang.org/issues/17150 Notes: Merged: https://github.com/ruby/ruby/pull/3521
2020-09-04Added Symbol#nameNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/16150#change-87446 Notes: Merged: https://github.com/ruby/ruby/pull/3514 Merged-By: nobu <nobu@ruby-lang.org>
2020-09-04lib/ostruct.rb: Revert "To use RuntimeError instead of FrozenError for old ↵Marc-Andre Lafortune
ruby versions." This reverts commit 4cd1fc8b3559353069860eee90b1b5bade013917.
2020-09-02Add category to `rb_warn_deprecated`eileencodes
PR https://github.com/ruby/ruby/pull/3418 added a category to `rb_warn_deprecated_to_remove` but not to `rb_warn_deprecated`. This adds the same code to `rb_warn_deprecated` so that those warnings also get a category. This change also adds tests for `rb_warn_deprecated` and updates the tests for `rb_warn_deprecated_to_remove` to have clearer names. I've fixed the call to `rb_method_entry` as we need to be using the instance method, not singleton. Feature: https://bugs.ruby-lang.org/issues/17122 Notes: Merged: https://github.com/ruby/ruby/pull/3505
2020-09-02Fix constant names set using const_set on a singleton classMarc-Andre Lafortune
Fixes [Bug #14895] Notes: Merged: https://github.com/ruby/ruby/pull/3502