Граф коммитов

71198 Коммитов

Автор SHA1 Сообщение Дата
git 7d81ee42ba * 2022-02-22 [ci skip] 2022-02-22 11:56:03 +09:00
Yusuke Endoh 25b0577c92 Factor a "highlight" symbol out 2022-02-22 11:55:40 +09:00
Yusuke Endoh eda10e8102 Remove unneeded newline from detailed_message 2022-02-22 11:55:40 +09:00
Yusuke Endoh 5099f64fa4 Add a test for Exception#detailed_message 2022-02-22 11:55:40 +09:00
Yusuke Endoh 4db986431a Let Exception#full_message pass highlight keywords to #detailed_message
.. even when the argument is not explicitly passed.
2022-02-22 11:55:40 +09:00
Yusuke Endoh 89e446683e test/ruby/test_rubyoptions.rb: Make it pass on Windows 2022-02-22 11:55:40 +09:00
Yusuke Endoh 98ca99cdd0 The default highlight arguments of Exception#detailed_message is false 2022-02-22 11:55:40 +09:00
Yusuke Endoh 35ff545bb6 Exception#detailed_message is added
Also, the default error printer and Exception#full_message use the
method instead of `Exception#message` to get the message string.

`Exception#detailed_message` calls `Exception#message`, decorates and
returns the result. It adds some escape sequences to highlight, and the
class name of the exception to the end of the first line of the message.

[Feature #18370]
2022-02-22 11:55:40 +09:00
Yusuke Endoh 3af316fa8c Refactor out rb_decorate_message from print_errinfo
rb_decorate_message adds bold escape sequences to message, and the class
name of exception (like " (RuntimeError)) of "message (RuntimeError)").
2022-02-22 11:55:40 +09:00
Yusuke Endoh f207f7a193 Do not escape error message
[Feature #18367]
2022-02-22 11:55:40 +09:00
Yusuke Endoh 36e31b09cd error.c: Refactoring
Factor out from rb_error_write the responsibility to check if stderr is
a tty.
2022-02-22 11:55:40 +09:00
Hiroshi SHIBATA c53bdb8ff6
Removed dependency of net-protocol. There is no plan to remove from stdlib 2022-02-21 17:10:56 +09:00
Hiroshi SHIBATA 79b04790e8
Removed dependency of io-wait. There is no plan to remove from stdlib 2022-02-21 17:10:22 +09:00
Nobuyoshi Nakada 8f0e3a97f9
rb_debug_rstring_null_ptr: add newlines in the message [ci skip]
The message should end with a newline, and break the long
paragraph.
2022-02-21 16:22:23 +09:00
Nobuyoshi Nakada f92f08ff23
[DOC] Set the documentation title and main page
Copied from https://github.com/ruby/docs.ruby-lang.org/ to be as
same as docs.ruby-lang.org.
2022-02-21 13:08:06 +09:00
git 1abd068445 * 2022-02-21 [ci skip] 2022-02-21 00:44:42 +09:00
Kazuhiro NISHIYAMA 1f3fe3801b
Fix links [ci skip] 2022-02-21 00:44:19 +09:00
git 9f3b6caf96 * 2022-02-20 [ci skip] 2022-02-20 20:40:16 +09:00
Nobuyoshi Nakada ed8776f960 [MSWin] Tentative measure for a bug of VS2022 [Misc #18362]
Disable the use of `__assume()`, when combinations of `isnan()`,
`isinf()` and `__assume()` will be wrongly optimized due to the
bug of VS2022.
2022-02-20 20:39:48 +09:00
Nobuyoshi Nakada 32af1a3b5e [MSWin] Try VS2022 2022-02-20 20:39:48 +09:00
Nobuyoshi Nakada 71388f9d39 [MSWin] Reduce duplicate configurations 2022-02-20 20:39:48 +09:00
Nobuyoshi Nakada 7470780058 Check if `__assume` is supported 2022-02-19 23:32:52 +09:00
Nobuyoshi Nakada 131154f878 Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just
a flag now, and redefined in ruby/backward/2/assume.h then.
2022-02-19 23:32:52 +09:00
S-H-GAMELINKS 6e6ee1e6b3 Replace and Using METACLASS_OF macro 2022-02-19 23:18:51 +09:00
Shugo Maeda c8817d6a3e
Add String#byteindex, String#byterindex, and MatchData#byteoffset (#5518)
* Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110]

Co-authored-by: NARUSE, Yui <naruse@airemix.jp>
2022-02-19 19:10:00 +09:00
Kazuki Tsujimoto db6b23c76c
Find pattern is no longer experimental [Feature #18585] 2022-02-19 18:45:49 +09:00
Kazuki Tsujimoto 3200d97e95
Fix location of NODE_LIT in p_kw 2022-02-19 18:45:36 +09:00
Nobuyoshi Nakada 4641abf0a2 Use symbols for clock IDs if `clockid_t` is not numeric 2022-02-19 15:33:15 +09:00
Nobuyoshi Nakada b3de25dfee Set static IDs to same name variables 2022-02-19 15:33:15 +09:00
Nobuyoshi Nakada 2ae35ad766 RUBY_REPLACE_TYPE: check if the target type is a pointer 2022-02-19 15:33:15 +09:00
Nobuyoshi Nakada dfa17f46a8
[DOC] prefer rdoc references over generated URLs 2022-02-19 15:14:01 +09:00
Burdette Lamar bec3a1f15a
Enhanced RDoc for io.c (#5573)
Links to options doc added/improved; in particular, new links to new section "Encoding Options" in encoding.rdoc.  Minor inconsistencies ironed out.
2022-02-18 16:17:51 -06:00
git 344f775eff * 2022-02-19 [ci skip] 2022-02-19 04:33:35 +09:00
Burdette Lamar 883fe55c4b
New doc about encoding (#5572)
This is the beginning of an extended explication of Ruby encoding.

One of its more important jobs is to provide link targets for encoding documentation in other classes (String, File, IO, etc.). In particular, they can link to the "Encoding Options" section.

I'll have much to add to this document going forward, along with suitable adjustments in the class documentation.
2022-02-18 13:33:18 -06:00
Peter Zhu 82513c7d71 Remove unused function declaration in dln.c
getenv is no longer used in dln.c.
2022-02-18 09:30:08 -05:00
Shugo Maeda cda5aee74e
LONG2NUM() should be used for rmatch_offset::{beg,end}
https://github.com/ruby/ruby/pull/5518#discussion_r809645406
2022-02-18 22:13:45 +09:00
Burdette Lamar e9a2b30744
Enhanced RDoc concerning command injection (#5537)
Clarifies security vulnerabilities for commands.

Treats:

    Kernel.system
    Kernel.` (backtick)
    IO.popen
    IO.read
    IO.write
    IO.binread
    IO.binwrite
    IO.readlines
    IO.foreach
2022-02-18 06:46:04 -06:00
NARUSE, Yui 542a38f619 gen-mail.rb: support markdown file path 2022-02-18 21:44:22 +09:00
Yuta Saito dff70b50d0 [wasm] vm.c: stop unwinding to main for every vm_exec call by setjmp
the original rb_wasm_setjmp implementation always unwinds to the root
call frame to have setjmp compatible interface, and simulate sjlj's
undefined behavior. Therefore, every vm_exec call unwinds to main, and
a deep call stack makes setjmp call very expensive. The following
snippet from optcarrot takes 5s even though it takes less than 0.3s on
native.

```
[0x0, 0x4, 0x8, 0xc].map do |attr|
  (0..7).map do |j|
    (0...0x10000).map do |i|
      clr = i[15 - j] * 2 + i[7 - j]
      clr != 0 ? attr | clr : 0
    end
  end
end
```

This patch adds a WASI specialized vm_exec which uses lightweight
try-catch API without unwinding to the root frame. After this patch, the
above snippet takes only 0.5s.
2022-02-18 18:28:18 +09:00
Akinori MUSHA ac32b7023a Mention Set as a new builtin class to NEWS 2022-02-18 11:56:24 +09:00
Akinori MUSHA dd3501bb95 Make Set a builtin feature [Feature #16989] 2022-02-18 11:56:24 +09:00
git 7757ccb504 * 2022-02-18 [ci skip] 2022-02-18 01:54:28 +09:00
Jeremy Evans 4c366ec977 Add Thread.each_caller_location
This method takes a block and yields Thread::Backtrace::Location
objects to the block.  It does not take arguments, and always
starts at the default frame that caller_locations would start at.

Implements [Feature #16663]
2022-02-17 08:54:07 -08:00
Nobuyoshi Nakada 4113862c00 Do not search for commands with double tool prefixes [Bug #18504]
The `CC` found by `AC_CHECK_TOOL` is prefixed by the host triplet
when cross compiling.  To search for commands with `AC_CHECK_TOOL`
based on that `CC` means to search also doubly prefixed names.
2022-02-17 22:47:02 +09:00
Nobuyoshi Nakada 992bdfea2d
Refine the load error message
Show the linked ruby library name when failed to load extension
built against different ruby library.
2022-02-17 20:29:50 +09:00
Nobuyoshi Nakada 5952a1f201
Check running macOS version at runtime 2022-02-17 20:29:50 +09:00
Nobuyoshi Nakada c8b414b334
Reuse `-v` option result as `target_platform`
Backticks method invokes `/bin/sh` when the command contains
quotes, and `sh` clears some environment variables set in
runruby.rb to search the built shared library.
2022-02-17 20:12:38 +09:00
Kazuhiro NISHIYAMA dfe7faa6b6
exclude name must be Regexp or Symbol
fdf0f8d814/tool/lib/test/unit.rb (L1273-L1290)
2022-02-17 19:04:16 +09:00
Koichi Sasada fdf0f8d814 btest-ruby OPTS=-v should disable quiet
`make btest-ruby` is run with -q (quiet) option and -v should
remove -q option.
2022-02-17 18:58:37 +09:00
Hiroshi SHIBATA 9f81d9f92d Hide patchlevel from release build 2022-02-17 14:36:30 +09:00