14021 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
c8010fcec0
Dup kwrest hash when merging other keyword arguments [Bug #17481] 2020-12-28 01:52:18 +09:00
Nobuyoshi Nakada
92f9f998fb
test/test_trick.rb: fixed the position to add timeout 2020-12-25 22:23:53 +09:00
Yusuke Endoh
a01d28fed7 test/test_trick.rb: increase timeout of some tests
http://rubyci.s3.amazonaws.com/raspbian10-armv7l/ruby-master/log/20201225T071824Z.fail.html.gz
2020-12-25 21:58:50 +09:00
Nobuyoshi Nakada
caae14d90b
test_trick.rb: Make the encoding explicit for code written in UTF-8 2020-12-25 15:57:41 +09:00
Yusuke Endoh
09216f63ba
test/test_trick.rb: Add a test file for TRICK entries (#3988)
* test/test_trick.rb: Add a test file for TRICK entries

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2020-12-25 15:22:37 +09:00
aycabta
9a7647d9eb [ruby/reline] Doesn't contain terminate spaces by cw
This closes ruby/reline#233.

https://github.com/ruby/reline/commit/4c3f2e2eae
2020-12-24 23:26:22 +09:00
aycabta
78421319d0 [ruby/reline] Use #bytesize for vi_replace_char
This closes ruby/reline#228.

https://github.com/ruby/reline/commit/8205fa0b00
2020-12-24 23:26:22 +09:00
aycabta
0db9842b2c [ruby/reline] Delete the last char of a line by dw
This closes ruby/reline#229.

https://github.com/ruby/reline/commit/3f0ae689c4
2020-12-24 23:26:22 +09:00
aycabta
634b231f33 [ruby/reline] Discard prompt cache by changing mode icon
https://github.com/ruby/reline/commit/bfeda8a79b
2020-12-24 23:26:22 +09:00
Nobuyoshi Nakada
bdbbfd1fa5 Store errno in struct rb_process_status
To propagate errno in the fiber thread scheduler hook.
Returns nil when no terminated process.
2020-12-24 22:59:37 +09:00
Marc-Andre Lafortune
7ca2ca9e32 Remove unneeded code 2020-12-24 04:58:40 -05:00
Yusuke Endoh
8e1c0b2f93 dir.c: chdir conflict should raise only when called in different thread
... and keep it as a warning (like 2.7) when it is called in the same
thread. [Bug #15661]
2020-12-24 14:34:40 +09:00
Koichi Sasada
6f29716f9f shareable_constant_value: experimental_copy
"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.
2020-12-24 14:28:47 +09:00
Jeremy Evans
1e215a66d2 Fix class of method in Method#inspect for singleton classes of classes
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]
2020-12-23 19:29:19 -08:00
Yusuke Endoh
f755926ddd test/ruby/test_module.rb: not depend on the order of method definitions 2020-12-24 10:15:15 +09:00
Nobuyoshi Nakada
4a8ff22f0c
Reset paren_nest at tAREF and tASET [Bug #17431] 2020-12-24 01:39:52 +09:00
Yusuke Endoh
3a81daaf8d Module#public_class_method also accepts a symbol array as an argument
I'm unsure if this is intentional, but add a document anyway.
[Feature #17314]
2020-12-24 00:15:29 +09:00
aycabta
129ecb43e5 [ruby/irb] Fix error_message for assert_dynamic_prompt
https://github.com/ruby/irb/commit/b12dfb6298
2020-12-23 21:26:25 +09:00
Hiroshi SHIBATA
8259d88938 [ruby/psych] Skip test_ractor.rb with ruby/psych repo
Because ruby/psych still uses minitest. minitest didn't support
  assert_ractor provided by test suite of ruby/ruby repo.

https://github.com/ruby/psych/commit/7da26358f1
2020-12-23 19:45:54 +09:00
Marc-Andre Lafortune
daec109f42 [ruby/psych] Optimize cache with compare_by_identity
Using `compare_by_identity` gives a 4x performance boost on cache hits.
Benchmark in https://github.com/JuanitoFatas/fast-ruby/issues/189
2020-12-23 01:08:38 -05:00
Marc-Andre Lafortune
c5a445d577 [ruby/psych] Make Ractor-ready.
Config is Ractor-local.

Benchmarking reveals that using `Ractor.local_storage` for storing cache
is similar to accessing a constant (~15% slower).
2020-12-23 01:08:38 -05:00
Nobuyoshi Nakada
8a1e12499b Ensure non-literal expressions shareable if leteral 2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
c0a2d95cf3 Update rb_ractor_ensure_shareable
* Fixed use of rb_ractor_shareable_p
* Raise Ractor::IsolationError
2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
b2aa21b868 Split the test 2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
d1c7db9d00 Added assertions 2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
e70206f570 Added dedicated helper methods 2020-12-23 13:50:42 +09:00
Nobuyoshi Nakada
7a094146e6 Changed shareable literal semantics [Feature #17397]
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`.
2020-12-23 13:50:42 +09:00
Hiroshi SHIBATA
339227363c Merge RubyGems 3.2.3 and Bundler 2.2.3 2020-12-23 10:17:41 +09:00
Nobuyoshi Nakada
733ed1e184 ripper: fix bad label parameter handling [Bug #17425] 2020-12-23 09:56:35 +09:00
Marc-Andre Lafortune
cd63f0358f [ruby/etc] Make Ractor safe 2020-12-22 19:46:07 -05:00
Kenta Murata
74652e640a
[memory_view][fiddle] Rename len to byte_size in rb_memory_view_t 2020-12-23 09:24:53 +09:00
aycabta
841d22ea47 [ruby/reline] [ruby/irb] Handle multiple newlines in a token correctly
Co-authored-by: manga_osyo <manga.osyo@gmail.com>
Co-authored-by: ima1zumi <mariimaizumi5@gmail.com>

https://github.com/ruby/irb/commit/c59a9be82f

https://github.com/ruby/reline/commit/a7922da16b
2020-12-23 06:06:07 +09:00
Delton Ding
f1591b3858 Add verbose nil in testing 2020-12-23 03:27:14 +09:00
Delton Ding
c6d7e02b90 Enable Fiber.current and Fiber#alive? call inside ractor 2020-12-23 03:27:14 +09:00
Kazuki Tsujimoto
31b17a14ab
Make NoMatchingPatternError a subclass of StandardError 2020-12-23 02:31:02 +09:00
ima1zumi
299f5708a2 [ruby/reline] Fixed an exception occurred when ambiguous width character was passed to #calculate_width [Bug #17405]
https://github.com/ruby/reline/commit/f79b4c857f
2020-12-22 23:45:43 +09:00
aycabta
b52bc4a9c2 [ruby/reline] Support isearch-terminators
https://github.com/ruby/reline/commit/a7922da16b
2020-12-22 23:45:43 +09:00
aycabta
294552ca6c [ruby/reline] Render refreshed prompt just after i-search finished
https://github.com/ruby/reline/commit/0d3188fe34
2020-12-22 23:45:43 +09:00
Akinori MUSHA
96b8816793 Import set 1.0.1
- Eliminate warnings
- Convert rdoc to markdown
2020-12-22 21:41:44 +09:00
Hiroshi SHIBATA
edb76e8765 Prepare to release json-2.5.0 2020-12-22 19:44:27 +09:00
Marc-Andre Lafortune
f2f00e24fa [ruby/date] Make Ractor-compatible 2020-12-22 03:12:51 -05:00
卜部昌平
fa356a798a Enumerator.new: raise unless block given
Has been deprecated since c73b6bd7ebd01133538c645566944132dbde4d13.
[Feature #17116] [ruby-dev:50945]
2020-12-22 13:52:03 +09:00
Akinori MUSHA
3fa4bd8292 Import set 1.0.0
- SortedSet has been removed for dependency and performance reasons.
- Set#join is added as a shorthand for `.to_a.join`.
- Set#<=> is added.

https://github.com/ruby/set/blob/v1.0.0/CHANGELOG.md
2020-12-22 12:20:21 +09:00
Koichi Sasada
520dcbd600 reset cache before iterating
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]
2020-12-22 06:09:30 +09:00
Kenta Murata
14d7d1df25
[json] Make json Ractor safe 2020-12-21 22:10:43 +09:00
Kenta Murata
98cc15ed1e
[json] Stop using prototype objects 2020-12-21 22:10:33 +09:00
Nobuyoshi Nakada
d84dd66da0
Fixed a typo in an error class name 2020-12-21 18:17:45 +09:00
Hiroshi SHIBATA
391343e828 [ruby/rdoc] Guard for WEBrick
https://github.com/ruby/rdoc/commit/b1e7129e05
2020-12-21 16:21:46 +09:00
Nobuyoshi Nakada
8680ae9cbd
irb: Removed unused variables 2020-12-20 19:36:24 +09:00
Nobuyoshi Nakada
5b98b2ce39 win32: Use UTF-8 as filesystem encoding [Feature #12654]
Co-Authored-By: Dāvis Mosāns <davispuh@gmail.com>
2020-12-20 18:34:04 +09:00