Commit graph

67695 commits

Author SHA1 Message Date
Yusuke Endoh
5e9598baea [ruby/error_highlight] Fixed the argument for DidYouMean.formatter=
Looks like this bug was hidden by did_you_mean's rescuing any
exceptions.

7a8f0b4796
2021-08-20 16:27:07 +09:00
Yusuke Endoh
cad83fa3c4 ast.c: Rename "save_script_lines" to "keep_script_lines"
... as per ko1's preference. He is preparing to extend this feature to
ISeq for his new debugger. He prefers "keep" to "save" for this wording.
This API is internal and not included in any released version, so I
change it in advance.
2021-08-20 16:18:36 +09:00
Nobuyoshi Nakada
4c93c124c2
Turned the reminder comment to a compile-time message 2021-08-20 15:18:13 +09:00
Nobuyoshi Nakada
371bb4eadd
Add RBIMPL_TODO
Make `RUBY_VERSION_SINCE` and `RUBY_VERSION_BEFORE` to take major
and minor numbers so usable also in preprocessor directives.  Old
macros are renamed with "STRING".
2021-08-20 15:18:12 +09:00
Nobuyoshi Nakada
b32987a3d7
Simplify repeated member access macros 2021-08-20 14:04:07 +09:00
Shugo Maeda
754adbee91
Module#ancestors should not return superclasses of refinements
[ruby-core:86949] [Bug #14744]

Reported by Eregon (Benoit Daloze).  Thanks!
2021-08-20 10:42:01 +09:00
git
70510d1545 * 2021-08-20 [ci skip] 2021-08-20 08:30:24 +09:00
Mike Dalessio
c0f4e4ca6d undefine alloc functions for C extensions
per guidance in doc/extension.rdoc, these classes now undefine their
alloc functions:

- ObjectSpace::InternalObjectWrapper
- Socket::Ifaddr
2021-08-20 08:30:06 +09:00
Mike Dalessio
e8e3b7a0e2 Undefine the alloc function for T_DATA classes
which have not undefined or redefined it.

When a `T_DATA` object is created whose class has not undefined or
redefined the alloc function, the alloc function now gets undefined by
Data_Wrap_Struct et al. Optionally, a future release may also warn
that this being done.

This should help developers of C extensions to meet the requirements
explained in "doc/extension.rdoc". Without a check like this, there is
no easy way for an author of a C extension to see where they have made
a mistake.
2021-08-20 08:30:06 +09:00
Nobuyoshi Nakada
6963f8f743
Remove old warning aged nearly 8 years 2021-08-19 17:44:48 +09:00
Kazuki Tsujimoto
f96c199449
Fix test failure on spec/ruby/language/pattern_matching_spec.rb
3369486308
2021-08-19 17:28:30 +09:00
Kazuki Tsujimoto
ecb6d6a4ef
Allow omission of parentheses in one line pattern matching [Feature #16182] 2021-08-19 17:07:58 +09:00
Nobuyoshi Nakada
00d66f7ec2
Hard-link executable files to mae runnable
As `$ORIGIN` on Linux is refered from the real path of the
executable file, symbolic linked executable file cannot work.
2021-08-19 16:10:35 +09:00
git
e20e97b4c0 * 2021-08-19 [ci skip] 2021-08-19 11:33:29 +09:00
Soutaro Matsumoto
1985a3a77f
Bundle RBS 1.4.0 & typeprof 0.15.2 (#4753)
* Bundle RBS 1.4.0

* Bundle typeprof 0.15.2
2021-08-19 11:33:09 +09:00
Daniel Niknam
0b7969b6a3 Silence LoadError only if it is for rubygems itself
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2021-08-18 21:37:31 +09:00
John Hawthorn
d668cd188c rb_fix2uint should use FIXNUM_NEGATIVE_P
rb_num_negative_int_p is equivalent to calling the "<" method on
Integer (and checking whether it is overridden), where in this case we
are interested in whether the "actual" value can fit inside an unsigned
int.

This also was slow because rb_num_negative_int_p calls
rb_method_basic_definition_p, doing a method lookup to check for < being
overridden.

This replaces the check in both rb_fix2uint and rb_fix2ushort with FIXNUM_NEGATIVE_P which simply checks
whether the VALUE is signed.
2021-08-18 18:24:37 +09:00
Nobuyoshi Nakada
95e7aed82b
SIGILL can raise at stack overflow on Linux too [Bug #18084] 2021-08-18 17:23:27 +09:00
Nobuyoshi Nakada
574f3af36e
Rewind execution tags more at stack overflow [Bug #18084] 2021-08-18 17:23:19 +09:00
S.H
58bd943436
Replace f_boolcast with RBOOL macro
* Move f_boolcast definination

* Remove f_boolcast macro defination

* to
2021-08-18 02:25:19 +09:00
git
6a9bfa4d93 * 2021-08-18 [ci skip] 2021-08-18 00:00:54 +09:00
Nobuyoshi Nakada
36ae44ce2c
[ruby/date] Update zonetab.h at 2021-08-11
de7dca353f
2021-08-17 22:57:59 +09:00
Akinori MUSHA
4814528296 [DOC] Fix the rdoc for File::Stat#size? [ci skip] 2021-08-17 21:44:41 +09:00
Nobuyoshi Nakada
edf01d4e82
Treat NULL fake string as an empty string
And the NULL string must be of size 0.
2021-08-17 18:45:36 +09:00
Martin Dürst
21fd83a823 Mention update to Unicode Version 13.0.0 and Emoji Version 13.1
Mention the update to Unicode Version 13.0.0 and Unicode Emoji
Version 13.1 in NEWS.md. This completes issue #17750. [ci skip]
2021-08-17 17:08:59 +09:00
git
de764ae8e0 * 2021-08-17 [ci skip] 2021-08-17 16:30:28 +09:00
Martin Dürst
fd7f61cf21 Take into account data in emoji-variation-sequences.txt in tests.
The emoji data in emoji-variation-sequences.txt was not used for
in test/ruby/enc/test_emoji_breaks.rb, for unknown reasons.
It turned out that the format of each of the emoji data/test files
is slightly different, and that we didn't take into account that
empty fields after a semicolon, as present in
emoji-variation-sequences.txt, led to less fields than expected
when using split.
This addresses issue #18027.
2021-08-17 16:03:52 +09:00
Nobuyoshi Nakada
a8714b83c4
popen() is not available on emscripten 2021-08-16 17:00:19 +09:00
Nobuyoshi Nakada
07b12a1f48
Suppress unused-variable warnings 2021-08-16 16:02:49 +09:00
Nobuyoshi Nakada
ee7bd7d732
SIZE_MAX is not size_t on emscripten 2021-08-16 15:36:37 +09:00
Nobuyoshi Nakada
54199a3f5f
Use VALUE instead of intptr_t
On emscripten `intptr_t`, `uintptr_t`, `ptrdiff_t` and so on are
defined as `long`, but `PRIdPTR` and so on defined as `int`.
2021-08-16 15:36:37 +09:00
Nobuyoshi Nakada
5087a6a924
Fix COROUTINE_SRC on emscripten
Select the C source if exists, otherwise the assembler source,
instead of selecting by the coroutine type.
2021-08-16 13:45:30 +09:00
git
4cc44bd819 * 2021-08-16 [ci skip] 2021-08-16 09:07:09 +09:00
DC
f8f6d9895d coroutine use asm version for handful of architectures for freebsd. 2021-08-16 12:06:46 +12:00
Yusuke Endoh
164f50dea9 Update TypeProf to 0.15.1 2021-08-15 23:31:35 +09:00
Nobuyoshi Nakada
2aa6826e81 Extract the wrapped value when yydebug [Bug #18075] 2021-08-15 11:40:06 +09:00
Kazuki Tsujimoto
4568ba0711
Show verbose error messages when single pattern match fails
[0] => [0, *, a]
    #=> [0] length mismatch (given 1, expected 2+) (NoMatchingPatternError)

Ignore test failures of typeprof caused by this change for now.
2021-08-15 09:38:24 +09:00
Nobuyoshi Nakada
147bdcc436
[Win32] put a space before configure options [Bug #17588]
Not to be concatenated with the preceding `--with-`* option.
2021-08-15 01:01:24 +09:00
git
717f0c56fc * 2021-08-15 [ci skip] 2021-08-15 00:27:10 +09:00
Nobuyoshi Nakada
244fc65d1c
Disable checks for LTO [ci skip] 2021-08-15 00:20:38 +09:00
xtkoba+ruby@gmail.com
72317b333b
Ignore DW_FORM_ref_addr [Bug #17052]
Ignore `DW_FORM_ref_addr` form and other forms that are not supposed
to be used currently.
2021-08-14 23:57:52 +09:00
Nobuyoshi Nakada
29dd70492e
Add checks for gcc/clang with LTO 2021-08-14 23:23:55 +09:00
Nobuyoshi Nakada
2e49e4330d
Disable debug flag for executable files when LTO [ci skip]
Get rid of tons of linker warnings that it could not find object
file symbol for every symbols, when targeting darwin.
2021-08-14 23:22:04 +09:00
Nobuyoshi Nakada
97efd48fb1
Get rid of unintented recursion when RUBY_DEBUG 2021-08-14 23:12:31 +09:00
Nobuyoshi Nakada
1bd021a789 Mark internal class names 2021-08-14 23:11:58 +09:00
Nobuyoshi Nakada
58d82eacef Add some "cold" marks 2021-08-14 23:11:58 +09:00
Nobuyoshi Nakada
edd27e120e A comment for typed data in rb_check_type [ci skip] 2021-08-14 23:11:58 +09:00
Nobuyoshi Nakada
d58620e0a1 Rename labels in Check_Type more descriptive 2021-08-14 23:11:58 +09:00
aycabta
9f88135f78 [ruby/readline-ext] Give up Editline
d924cfc1e6
2021-08-14 22:13:56 +09:00
aycabta
2c056816c4 [ruby/reline] Add workspace member for the latest IRB's implementation
8b55fc8fee
2021-08-14 22:13:31 +09:00