Samuel Williams
dd2e95fb26
Remove Thread.scheduler
from public interface.
...
It's implementation is equivalent to:
Thread.current.scheduler unless Thread.current.blocking?
2020-10-01 16:56:05 +13:00
Samuel Williams
7f29020590
Raise an exception if the scheduler was already closed.
2020-10-01 16:02:03 +13:00
Samuel Williams
13660105e2
Don't call Scheduler#close
if it doesn't exist.
2020-10-01 16:02:03 +13:00
Koichi Sasada
bc23216e5a
stop Ractor test in test-all
...
Ractor changes the interpreter's running mode so now it should
not use in test-all process which running with many other tests.
Test with a separating process is one idea, but I'm not sure
the ruby/ostruct can use this trick.
2020-10-01 08:55:08 +09:00
Marc-Andre Lafortune
bb2ba72c3b
[ruby/ostruct] Tweak doc
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
152ba86b6b
[ruby/ostruct] Remove unused condition
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
b36a45c05c
[ruby/ostruct] Improved YAML serialization.
...
Patch adapted from Pietro Monteiro [Fixes bug#8382]
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
0e93118c44
[ruby/ostruct] Update NEWS
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
0977040133
[ruby/ostruct] Add test that frozen OpenStructs are Ractor-shareable
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
083fa6e5d2
[ruby/ostruct] Protect subclass' methods and our bang methods.
...
Internally, use only bang methods
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
df4d08c44a
[ruby/ostruct] Avoid calling initialize
2020-09-30 18:11:24 -04:00
Marc-Andre Lafortune
fb16c3dce2
Remove trailing whitespace [doc]
2020-09-30 18:11:24 -04:00
git
f4733b2c31
* 2020-10-01 [ci skip]
2020-10-01 04:58:36 +09:00
Burdette Lamar
4bc6190a34
Enhanced RDoc for String#[] ( #3607 )
...
* Enhanced RDoc for String#[]
2020-09-30 14:58:12 -05:00
Nobuyoshi Nakada
7b2bea42a2
Unfreeze string-literal-only interpolated string-literal
...
[Feature #17104 ]
2020-09-30 22:15:28 +09:00
Benoit Daloze
65e8a29389
Update to ruby/spec@bfd843a
2020-09-30 13:43:19 +02:00
Benoit Daloze
bbecf1eb6b
Update to ruby/mspec@e154fa1
2020-09-30 13:43:17 +02:00
Nobuyoshi Nakada
9501b34dfc
strip trailing spaces [ci skip]
2020-09-30 19:40:30 +09:00
Benoit Daloze
8dab56ea86
Update to ruby/spec@681e8cf
2020-09-30 12:39:20 +02:00
Benoit Daloze
31636bbddc
Update to ruby/mspec@4120a62
2020-09-30 12:39:18 +02:00
Benoit Daloze
201d501640
Update to ruby/spec@9277d27
2020-09-30 12:21:48 +02:00
Kazuhiro NISHIYAMA
ce986b41ca
Remove unneeded begin
and end
2020-09-30 15:55:07 +09:00
Kazuhiro NISHIYAMA
30bb040ea4
Fix Leaked tempfile
s
...
20200930
T033004Z.diff.html.gz
```
[n/n] JSONCommonInterfaceTest#test_load = <elapsed> s
[n/n] JSONCommonInterfaceTest#test_load_file = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file: #<Tempfile:<build-dir>/tmp/20200930-7601-ptnv6i (closed)>
[n/n] JSONCommonInterfaceTest#test_load_file! = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file!: #<Tempfile:<build-dir>/tmp/20200930-7601-1la6m9 (closed)>
[n/n] JSONCommonInterfaceTest#test_load_file_with_option = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file_with_option: #<Tempfile:<build-dir>/tmp/20200930-7601-blf9hz (closed)>
[n/n] JSONCommonInterfaceTest#test_load_file_with_option! = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file_with_option!: #<Tempfile:<build-dir>/tmp/20200930-7601-b5gsdb (closed)>
```
2020-09-30 15:41:14 +09:00
Kazuhiro NISHIYAMA
1484b786ae
Suppress warnings
...
```
compiling ../mjit.c
In file included from ../mjit.c:28:
../mjit_worker.c:1270:33: warning: incompatible pointer to integer conversion passing 'const struct rb_callcache *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
assert(BUILTIN_TYPE(cc) != T_MOVED);
^~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../include/ruby/internal/value_type.h:153:23: note: passing argument to parameter 'obj' here
RB_BUILTIN_TYPE(VALUE obj)
^
In file included from ../mjit.c:28:
../mjit_worker.c:1271:33: warning: incompatible pointer to integer conversion passing 'const struct rb_callable_method_entry_struct *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
assert(BUILTIN_TYPE(vm_cc_cme(cc)) != T_MOVED);
^~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../include/ruby/internal/value_type.h:153:23: note: passing argument to parameter 'obj' here
RB_BUILTIN_TYPE(VALUE obj)
^
In file included from ../mjit.c:28:
../mjit_worker.c:1272:50: warning: incompatible pointer to integer conversion passing 'const struct rb_callcache *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
assert(!rb_objspace_garbage_object_p(cc));
^~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../gc.h:128:40: note: passing argument to parameter 'obj' here
int rb_objspace_garbage_object_p(VALUE obj);
^
In file included from ../mjit.c:28:
../mjit_worker.c:1273:50: warning: incompatible pointer to integer conversion passing 'const struct rb_callable_method_entry_struct *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
assert(!rb_objspace_garbage_object_p(vm_cc_cme(cc)));
^~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../gc.h:128:40: note: passing argument to parameter 'obj' here
int rb_objspace_garbage_object_p(VALUE obj);
^
4 warnings generated.
```
2020-09-30 13:37:07 +09:00
Samuel Williams
388281c5c9
Fix order of operations during rb_ec_finalize
.
2020-09-30 16:34:38 +13:00
Burdette Lamar
48b94b7919
Enhanced RDoc for String#upto ( #3603 )
...
* Enhanced RDoc for String#upto
2020-09-29 19:15:39 -05:00
Maciej Mensfeld
0fb1a67bda
Reference process PID using the Process#pid
...
This change will allow formatter to run from Ractors other than main.
2020-09-29 11:50:46 -07:00
git
c38605de6b
* 2020-09-30 [ci skip]
2020-09-30 00:32:22 +09:00
Peter Zhu
f7bd9f0750
Fix unsigned int overflow in error message for chr
...
The error message has an integer overflow because it treats an unsigned int as a signed int.
Before:
```
> 3_000_000_000.chr
-1294967296 out of char range (RangeError)
```
After:
```
> 3_000_000_000.chr
3000000000 out of char range (RangeError)
```
Redmine ticket: https://bugs.ruby-lang.org/issues/17186
2020-09-30 00:31:59 +09:00
Kazuhiro NISHIYAMA
cece71b467
Add call-seq of [Feature #16274 ]
2020-09-29 22:49:44 +09:00
Yusuke Endoh
d23d2f3f6f
[ruby/webrick] Make it more strict to interpret some headers
...
Some regexps were too tolerant.
8946bb38b4
2020-09-29 16:40:33 +09:00
Nobuyoshi Nakada
dcb705ace7
doc/syntax/literals.rdoc: explain #@@foo
too [ci skip]
2020-09-29 15:28:09 +09:00
Yusuke Endoh
2e947bc181
doc/syntax/literals.rdoc: explain #@foo
and #$foo
2020-09-29 14:39:52 +09:00
Nobuyoshi Nakada
a9ff390870
Fixed installation failure [Bug #17191 ]
...
Try update and extract bundled gems only when baseruby is
available. It should be done only when installing from
developemental build and not from the tarball, but it is not
obvious to differentiate them.
2020-09-29 13:41:59 +09:00
Nobuyoshi Nakada
b971f141b2
Fix up dependencies on internal/sanitizers.h
2020-09-29 13:14:54 +09:00
Yusuke Endoh
40a499db65
test/racc/test_racc_command.rb: prevent a warning
...
20200929
T003003Z.log.html.gz
```
warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
2020-09-29 11:58:04 +09:00
卜部昌平
06099e4ee1
fix typo [ci skip]
...
Reported by Mau Magnaguagno See: https://github.com/ruby/ruby/pull/3570#discussion_r495465903
2020-09-29 09:57:47 +09:00
Aaron Patterson
0a3099ae40
bit table information when printing an object
2020-09-28 16:45:19 -07:00
Aaron Patterson
85e9cc2c87
Unpoison THEAP header before reading
...
Another ASAN fix. THEAP header is poisoned, so we need to un-poison
before reading
2020-09-28 10:18:15 -07:00
Burdette Lamar
0555bd8435
Enhanced RDoc for String#succ! ( #3596 )
...
* Enhanced RDoc for String#succ!
2020-09-28 11:58:39 -05:00
Aaron Patterson
d598654c74
Fix ASAN and don't check SPECIAL_CONST_P
...
Heap allocated objects are never special constants. Since we're walking
the heap, we know none of these objects can be special. Also, adding
the object to the freelist will poison the object, so we can't check
that the type is T_NONE after poison.
2020-09-28 09:45:04 -07:00
Aaron Patterson
664eeda66e
Fix ASAN errors when updating call cache
...
Invalidating call cache walks the heap, so we need to take care to
un-poison objects when examining them
2020-09-28 09:45:04 -07:00
Aaron Patterson
0767d387ec
Pass ASAN options to child environments
...
I want to work with ASAN, but some child environments are not inheriting
the ASAN options I'm using. This commit passes them to child
environments if specified
2020-09-28 09:45:04 -07:00
Jeremy Evans
346301e232
Add rb_category_warn{,ing} for warning messages with categories
...
This adds the following C-API functions that can be used to emit
warnings with categories included:
```c
void rb_category_warn(const char *, const char*, ...)
void rb_category_warning(const char*, const char*, ...)
```
Internally in error.c, there is an rb_warn_category function
that will call Warning.warn with the string and the category
keyword if it doesn't have an arity of 1, and will call
Warning.warn with just the string if it has an arity of 1.
This refactors the rb_warn_deprecated{,_to_remove} functions
to use rb_warn_category.
This makes Kernel#warn accept a category keyword and pass it
to Warning.warn, so that Ruby methods can more easily emit
warnings with categories. rb_warn_category makes sure that
the passed category is a already defined category symbol
before calling Warning.warn.
The only currently defined warning category is :deprecated,
since that is what is already used. More categories can be
added in later commits.
2020-09-28 08:38:06 -07:00
Jeremy Evans
92c3ad9c27
Make Warning.warn accept only category keyword
...
In general accepting arbitrary keywords is a bad idea unless you are
delegating keywords or acting on arbitrary keywords. In this case,
the category keyword is ignored, and it's less error prone to not
ignore all keywords.
2020-09-28 08:38:06 -07:00
Jeremy Evans
5d7953f86b
Switch conflicting chdir warning to RuntimeError
...
The documentation already stated this was an error in one case
(when it was previously a warning). Describe the other case,
where chdir without block is called inside block passed to chdir.
Fixes [Bug #15661 ]
2020-09-28 08:34:04 -07:00
git
0164ac70a1
* 2020-09-29 [ci skip]
2020-09-29 00:20:47 +09:00
Aaron Patterson
0b0e2d88ce
Refactor common heap iteration code
...
We have code common to all heap iteration paths in this file. Refactor
such that we keep ASAN checks and flags checks in one place
2020-09-28 08:20:23 -07:00
Aaron Patterson
b9488accf9
Fix ASAN support when invalidating CCs
...
Again, this code is walking the heap. Empty slots can be poisoned, so
we need to unpoison before checking the type
2020-09-28 08:20:23 -07:00
Aaron Patterson
b328b83026
make ext/coverage ASAN friendly
2020-09-28 08:20:23 -07:00