summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2021-01-04Fix broken JIT of getinlinecacheTakashi Kokubun
e7fc353f04 reverted vm_ic_hit_p's signature change made in 53babf35ef, which broke JIT compilation of getinlinecache. To make sure it doesn't happen again, I separated vm_inlined_ic_hit_p to make the intention clear.
2021-01-05enable constant cache on ractorsKoichi Sasada
constant cache `IC` is accessed by non-atomic manner and there are thread-safety issues, so Ruby 3.0 disables to use const cache on non-main ractors. This patch enables it by introducing `imemo_constcache` and allocates it by every re-fill of const cache like `imemo_callcache`. [Bug #17510] Now `IC` only has one entry `IC::entry` and it points to `iseq_inline_constant_cache_entry`, managed by T_IMEMO object. `IC` is atomic data structure so `rb_mjit_before_vm_ic_update()` and `rb_mjit_after_vm_ic_update()` is not needed. Notes: Merged: https://github.com/ruby/ruby/pull/4022
2021-01-04Fixed error message when % at EOFNobuyoshi Nakada
2021-01-03Added tests for Time#getlocal with UTC offsetNobuyoshi Nakada
2021-01-03Avoid hanging on --jit-wait after MJIT.pauseTakashi Kokubun
When a worker is stopped, nobody will JIT a method for you.
2021-01-02Add Enumerable#compact and Enumerator::Lazy#compactzverok
Notes: Merged: https://github.com/ruby/ruby/pull/3851
2021-01-01Added AST assertions for method definition arguments [Bug #17495]Nobuyoshi Nakada
2021-01-01Added AST tests for endless method definitionsNobuyoshi Nakada
2020-12-31Make any hash values fixable [Bug #17488]Nobuyoshi Nakada
As hnum is an unsigned st_index_t, the result of RSHIFT may not be in the fixable range. Co-authored-by: NeoCat <neocat@neocat.jp>
2020-12-28Dup kwrest hash when merging other keyword arguments [Bug #17481]Nobuyoshi Nakada
2020-12-24Store errno in struct rb_process_statusNobuyoshi Nakada
To propagate errno in the fiber thread scheduler hook. Returns nil when no terminated process. Notes: Merged: https://github.com/ruby/ruby/pull/3998
2020-12-24Remove unneeded codeMarc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/3993
2020-12-24dir.c: chdir conflict should raise only when called in different threadYusuke Endoh
... and keep it as a warning (like 2.7) when it is called in the same thread. [Bug #15661] Notes: Merged: https://github.com/ruby/ruby/pull/3990
2020-12-24shareable_constant_value: experimental_copyKoichi Sasada
"experimental_everything" makes the assigned value, it means the assignment change the state of assigned value. "experimental_copy" tries to make a deep copy and make copyied object sharable. Notes: Merged: https://github.com/ruby/ruby/pull/3989
2020-12-23Fix class of method in Method#inspect for singleton classes of classesJeremy Evans
Previously, due to a change to fix bug 15608, Method#inspect output changed for class methods: Ruby 2.7 "#<Method: String.prepend(*)>" Before change: "#<Method: #<Class:Object>(Module)#prepend(*)>" This is wrong because the Method object was created from String and not Object. This is because the fix for bug 15608 assumed it was being called on the singleton class of a instance, and would skip the first singleton class until it got to the class itself. For class methods, this results in always using the superclass. Fix behavior to not skip until the superclass if the singleton class is the singleton class of a module or class. After change: "#<Method: #<Class:Object>(Module)#prepend(*)>" Fixes [Bug #17428] Notes: Merged: https://github.com/ruby/ruby/pull/3984
2020-12-24test/ruby/test_module.rb: not depend on the order of method definitionsYusuke Endoh
2020-12-24Reset paren_nest at tAREF and tASET [Bug #17431]Nobuyoshi Nakada
2020-12-24Module#public_class_method also accepts a symbol array as an argumentYusuke Endoh
I'm unsure if this is intentional, but add a document anyway. [Feature #17314]
2020-12-23Ensure non-literal expressions shareable if `leteral`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23Update rb_ractor_ensure_shareableNobuyoshi Nakada
* Fixed use of rb_ractor_shareable_p * Raise Ractor::IsolationError Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23Split the testNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23Added assertionsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23Added dedicated helper methodsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23Changed shareable literal semantics [Feature #17397]Nobuyoshi Nakada
When `literal`, check if the literal about to be assigned to a constant is ractor-shareable, otherwise raise `Ractor::Error` at runtime instead of `SyntaxError`. Notes: Merged: https://github.com/ruby/ruby/pull/3950
2020-12-23[memory_view][fiddle] Rename len to byte_size in rb_memory_view_tKenta Murata
2020-12-23Make NoMatchingPatternError a subclass of StandardErrorKazuki Tsujimoto
2020-12-22Enumerator.new: raise unless block given卜部昌平
Has been deprecated since c73b6bd7ebd01133538c645566944132dbde4d13. [Feature #17116] [ruby-dev:50945] Notes: Merged: https://github.com/ruby/ruby/pull/3968
2020-12-22reset cache before iteratingKoichi Sasada
cee02d754d76563635c1db90d2ab6c01f8492470 resets pCMC and `me` will be a invalidated and continuing the invalidated `me`, it will break the data structure. This patch tris to clear all methods of specified class before manipulating the `me`s. [Issue #17417] Notes: Merged: https://github.com/ruby/ruby/pull/3964
2020-12-20win32: Use UTF-8 as filesystem encoding [Feature #12654]Nobuyoshi Nakada
Co-Authored-By: Dāvis Mosāns <davispuh@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/3948
2020-12-19test/ruby/test_module.rb: Avoid "warning: method redefined"Yusuke Endoh
2020-12-19Recommit 34f06062174882a98ebef998c50ad8d4f7fc0f2eYusuke Endoh
2020-12-19Partially reintroduce e042e8460bb9a63c05f938d51e8c7c5345a6f3a4 and ...Yusuke Endoh
34f06062174882a98ebef998c50ad8d4f7fc0f2e Add a test for alias_method
2020-12-19Added missing tests for public, private, protected and alias_methodNobuyoshi Nakada
2020-12-19fix refinements/prepend bugKoichi Sasada
replaced method entry should be invalidated. [Bug #17386]
2020-12-19Added tests for [Feature #17314]Yusuke Endoh
Partially reintroduce 34f06062174882a98ebef998c50ad8d4f7fc0f2e
2020-12-18Use category: :deprecated in warnings that are related to deprecationJeremy Evans
Also document that both :deprecated and :experimental are supported :category option values. The locations where warnings were marked as deprecation warnings was previously reviewed by shyouhei. Comment a couple locations where deprecation warnings should probably be used but are not currently used because deprecation warning enablement has not occurred at the time they are called (RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K). Add assert_deprecated_warn to test assertions. Use this to simplify some tests, and fix failing tests after marking some warnings with deprecated category. Notes: Merged: https://github.com/ruby/ruby/pull/3917
2020-12-19Fixed not to make non-literal expression shareable [Feature #17273]Nobuyoshi Nakada
Non-literal expression which is not a part of a literal expression is not a subject of `shareable_literal_value: literal`.
2020-12-18Removed old GC tuning environment variables deprecated since 2.1Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3921
2020-12-18Revert "Added missing tests for public, private, protected and alias_method"Yusuke Endoh
This reverts commit e042e8460bb9a63c05f938d51e8c7c5345a6f3a4.
2020-12-18Revert "Added tests for [Feature #17314]"Yusuke Endoh
This reverts commit 34f06062174882a98ebef998c50ad8d4f7fc0f2e.
2020-12-18Drop token info also for endless singleton method definitionNobuyoshi Nakada
2020-12-18Added tests for [Feature #17314]Nobuyoshi Nakada
2020-12-18Added missing tests for public, private, protected and alias_methodNobuyoshi Nakada
2020-12-18use eval to create different Regexp objectsKoichi Sasada
Only one warning is shown for the same Regexp object, so create different objects to support repeating tests. http://ci.rvm.jp/results/trunk-repeat20@phosphorus-docker/3290658
2020-12-17test/ruby: suppress some warningsYusuke Endoh
follow up to 9908177857a28633d6279c43a1ad4dfedcb98596
2020-12-17test/ruby: Check warning messages at a finer granularityNobuyoshi Nakada
Instead of suppressing all warnings wholly in each test scripts by setting `$VERBOSE` to `nil` in `setup` methods. Notes: Merged: https://github.com/ruby/ruby/pull/3925 Merged-By: nobu <nobu@ruby-lang.org>
2020-12-16test/ruby/test_enum.rb: Avoid "warning: assigned but unused variable"Yusuke Endoh
2020-12-16[memory_view] Make MemoryView API Ractor-safe (#3911)Kenta Murata
* memory_view.c: make Ractor-safe * test/ruby/test_memory_view.rb: Add test_ractor * memory_view: fix typo * memory_view.c: Use st_update in unregster_exported_object * memory_view: update dependency Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-12-16Fixed marshal compatibility of Process::StatusNobuyoshi Nakada
2020-12-15Optimize `Enumerable#grep{_v}`Marc-Andre Lafortune
[Bug #17030] Notes: Merged: https://github.com/ruby/ruby/pull/3868