Nobuyoshi Nakada
5a77e90fe8
Use rb_intern_const instead of rb_intern in Init functions
...
```
find . -name \*.o -exec nm {} + |&
sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' |
uniq
```
should be empty.
2020-10-21 12:46:53 +09:00
Stefan Stüben
8c2e5bbf58
Don't redefine #rb_intern over and over again
2020-10-21 12:45:18 +09:00
Nobuyoshi Nakada
d497436d07
Update dependencies for macOS
2020-10-21 12:31:45 +09:00
Jean Boussier
520e0916af
Implement a freeze: parser option
...
If set to true all parsed objects will be
immediately frozen, and strings will be
deduplicated if the Ruby implementation
allows it.
2020-10-20 21:40:25 +09:00
Hiroshi SHIBATA
3f97940252
Followed up with 708413807a
...
* Added sync task for digest
* Update doc/* for default gems
* Update the latest version of gemspec
2020-10-19 18:56:19 +09:00
Hiroshi SHIBATA
708413807a
Revisit to promote digest to default gems.
...
This reverts commit f39021be7e
.
2020-10-19 18:38:09 +09:00
Aaron Patterson
ff9dc10966
keep proc on the stack so it does not move
2020-10-16 11:28:52 -07:00
Hiroshi SHIBATA
9aab916990
Promote pathname to default gems
2020-10-14 14:42:53 +09:00
Nobuyoshi Nakada
27b48089e2
Adjusted indents [ci skip]
2020-10-11 14:22:43 +09:00
Nobuyoshi Nakada
fddffa4c7a
Respect the original styles [ci skip]
2020-10-11 11:57:32 +09:00
Nobuyoshi Nakada
71428ac264
[ruby/io-console] Refined getch warnings
...
f84e6abcce
2020-10-11 02:00:28 +09:00
Nobuyoshi Nakada
37259e878f
[ruby/io-console] Relaxed min: option warning
...
When `min: 0` is given to `IO#getch` with `time:` option, it is
expected to return nil if timed out, and needed for source code
the compatibility with unixen platforms.
a2afbe72bd
2020-10-11 02:00:26 +09:00
Nobuyoshi Nakada
a79966743c
[ruby/io-console] Fix timeout type error ( #18 )
...
Fixed TypeError when IO#getch timed out
`rb_io_wait` returns a bit-flags Integer representing available
events, or Qfalse if timed out. Also the result of `NUM2INT` is
not a `VALUE`.
```
$ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)"
ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc
) [x64-mingw32]
-e:1:in `getch': no implicit conversion of false into Integer (TypeError)
from -e:1:in `<main>'
```
3bdfaf62df
2020-10-11 02:00:24 +09:00
Nobuyoshi Nakada
b59640e155
[ruby/io-console] Fixed "Rework console to use rb_io_wait
."
...
* Fixed backward compatibility.
* Added missing `rb_scheduler_timeout` declaration.
813806079f
2020-10-11 01:27:15 +09:00
Ikko Ashimine
df25007046
Fixed typo in comment
...
alway -> always
2020-10-10 02:32:21 -04:00
Aaron Patterson
cdc4084b0a
Prevent objects from moving while iterating the heap
...
This iterator uses an st_table, but if objects move the references in
the st table won't be updated. This patch just changes the st table to
an identity hash.
2020-10-06 16:22:01 -07:00
Nobuyoshi Nakada
21b199bb24
Appended a newline to suppress newline-eof warning
2020-10-06 23:18:42 +09:00
卜部昌平
ae94c5bf5d
STRUCT_ALIGNOF: use RUBY_ALIGNOF
...
This was a workaround for RUBY_ALIGNOF's glitch, which has already been
fixed. See also https://github.com/ruby/ruby/pull/3570
2020-10-06 14:20:10 +09:00
Aaron Patterson
6aa466ba9c
mark regex internal to string scanner
2020-10-02 12:01:57 -07:00
Kazuhiro NISHIYAMA
d0a7189f26
Fix ObjectSpace.dump(obj, output: :stdout)
...
RDoc says `ObjectSpace.dump(obj, output: :stdout) # => nil`,
but it returns STDOUT since fbba6bd4e3
.
I think it is unintentional change.
2020-10-03 00:00:01 +09:00
Kenta Murata
c827cacde1
memory_view.c: Use ssize_t for ndim in memory_view ( #3615 )
...
* memory_view.c: Use ssize_t for ndim in memory_view
* include/ruby/memory_view.h: Fix the type of item_size argument
2020-10-02 08:04:25 +09:00
Nobuyoshi Nakada
9501b34dfc
strip trailing spaces [ci skip]
2020-09-30 19:40:30 +09:00
Nobuyoshi Nakada
b971f141b2
Fix up dependencies on internal/sanitizers.h
2020-09-29 13:14:54 +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
Aaron Patterson
18b3f0f54c
Make ext/objspace ASAN friendly
...
ext/objspace iterates over the heap, but some slots in the heap are
poisoned, so we need to take care of that when running with ASAN
2020-09-28 08:20:23 -07:00
Yusuke Endoh
950614b088
ext/socket/ipsocket.c: prevent "warning: unused variable 'resolv_timeout'"
2020-09-27 02:38:39 +09:00
NARUSE, Yui
4e31cbc070
update-deps
...
1169621878
2020-09-26 18:55:00 +09:00
Alan Wu
24820d508b
Return nil when argument to ObjectSpace.internal_class_of is T_IMEMO
...
The added test case crashes the interpreter because it makes
ObjectSpace.internal_class_of return the second VALUE slot of an AST
imemo object. The second VALUE slot of `struct rb_ast_struct` is
not a VALUE and not a pointer to a Ruby object.
2020-09-25 09:27:49 -07:00
Kenta Murata
3a00f2a0f4
ext/readline/depend: update-deps --fix
2020-09-26 00:34:27 +09:00
aycabta
f4328d7f5d
[ruby/readline-ext] Remove unnecessary header files from depend
...
f9783c0739
2020-09-25 21:34:34 +09:00
Kenta Murata
890bc2cdde
Buffer protocol proposal ( #3261 )
...
* Add buffer protocol
* Modify for some review comments
* Per-object buffer availability
* Rename to MemoryView from Buffer and make compilable
* Support integral repeat count in memory view format
* Support 'x' for padding bytes
* Add rb_memory_view_parse_item_format
* Check type in rb_memory_view_register
* Update dependencies in common.mk
* Add test of MemoryView
* Add test of rb_memory_view_init_as_byte_array
* Add native size format test
* Add MemoryView test utilities
* Add test of rb_memory_view_fill_contiguous_strides
* Skip spaces in format string
* Support endianness specifiers
* Update documentation
* Support alignment
* Use RUBY_ALIGNOF
* Fix format parser to follow the pack format
* Support the _ modifier
* Parse count specifiers in get_format_size function.
* Use STRUCT_ALIGNOF
* Fix test
* Fix test
* Fix total size for the case with tail padding
* Fix rb_memory_view_get_item_pointer
* Fix rb_memory_view_parse_item_format again
2020-09-25 20:32:02 +09:00
Jean Boussier
927a377a7c
[flori/json] Fix JSON.load_file doc
...
cb61a00ba8
2020-09-25 17:28:42 +09:00
BurdetteLamar
038252fe66
[flori/json] Partial compliance with doc/method_documentation.rdoc
...
6dfa885134
2020-09-25 17:28:42 +09:00
Burdette Lamar
71f64e15b9
[flori/json] Enhanced RDoc for JSON.dump ( #443 )
...
* Enhanced RDoc for JSON.dump
03f1699ec4
2020-09-25 17:28:42 +09:00
Julien Feltesse
3d5e833998
bundle the LICENSE file in the gem
2020-09-25 17:28:42 +09:00
BurdetteLamar
de0e0ffad4
[flori/json] Nodoc for recurse_proc
...
f8c0fe2408
2020-09-25 17:28:42 +09:00
BurdetteLamar
e9096f796c
[flori/json] RDoc for JSON.load with proc
...
a55c91934e
2020-09-25 17:28:42 +09:00
Karol Bucek
f8d43e5370
unify json-java gemspec with the baseline
2020-09-25 17:28:42 +09:00
BurdetteLamar
8c057bb845
[flori/json] RDoc example for JSON.load
...
e4eead665c
2020-09-25 17:28:42 +09:00
BurdetteLamar
36b2177ea8
[flori/json] Enhance RDoc for JSON.parse
...
33e64ef255
2020-09-25 17:28:42 +09:00
BurdetteLamar
71b1bbad02
[flori/json] Move options from #generate and #parse to common area
...
20d7be605a
2020-09-25 17:28:42 +09:00
Keith Bennett
c3614877d2
[flori/json] Add load_file
and load_file!
methods, with tests. Fixes issue #386 .
...
0be363c99b
2020-09-25 17:28:42 +09:00
Jean Boussier
e1659af372
Add an option to escape forward slash character
...
Squashed commit of the following:
commit 26d181059989279a79c433cedcd893b4f52e42ee
Author: Francois Chagnon <francois.chagnon@jadedpixel.com>
Date: Tue Sep 15 21:17:34 2015 +0000
add config options for escape_slash
commit fa282334051b16df91ca097dd7304b46f3bc7719
Author: Francois Chagnon <francois.chagnon@jadedpixel.com>
Date: Mon Feb 9 21:09:33 2015 +0000
add forward slash to escape character
2020-09-25 17:28:42 +09:00
Masaki Matsushita
f2d1808e73
Add comments for resolv_timeout
2020-09-25 15:39:26 +09:00
Masaki Matsushita
511fe23fa2
Add resolve_timeout to TCPSocket [Feature #17134 ]
2020-09-25 15:19:14 +09:00
Jean Boussier
b72f9200ac
[ruby/psych] Forward keyword arguments in load_file and load_stream
...
4e1dd37f09
2020-09-25 13:11:33 +09:00
Hiroshi SHIBATA
8ea1021f19
[ruby/psych] Bump version to 3.2.0
...
181a727c90
2020-09-25 13:11:33 +09:00
SzymonKowalczyk
263c43487f
[ruby/psych] Revert psych version
...
55a294fcd0
2020-09-25 13:11:33 +09:00