7863 Commits
Author SHA1 Message Date
Hiroshi SHIBATA bd9424c71c Merge StringIO 3.0.1.1 2024-04-23 16:03:15 +09:00
NAKAMURA Usaku 4a8d7246d1 zlib 1.2.13 is gone from zlib.net 2023-08-22 10:25:14 +09:00
Kazuki Yamaguchi ba5cf0f7c5 Merge openssl-2.2.2
The changes can be found at:

  https://github.com/ruby/openssl/compare/v2.2.1...v2.2.2
2022-11-24 20:04:56 +09:00
Nobuyoshi Nakada 1407149f7b Update zlib version 2022-10-15 23:09:20 +09:00
Hiroshi SHIBATAandYuta Saito 7900a9bd38 Backport https://github.com/ruby/ruby/pull/6193
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
2022-09-16 15:12:47 +09:00
nagachika 74b42fe781 remove bundled zlib patch file for mswin platform. It's already applied at zlib-1.2.12. 2022-04-02 14:20:08 +09:00
nagachika b364e23d76 remove bundled zlib patch file for mswin platform. It's already applied at zlib-1.2.12. 2022-04-02 14:16:13 +09:00
nagachika 6a022fb22d rename filepath in patch for zlib. 2022-04-02 14:08:11 +09:00
nagachika 2802f0628c rename bundled zlib patch file for mswin platform. 2022-04-02 14:03:37 +09:00
nagachika 5fafd801fb bundle zlib-1.2.12 instead of 1.2.11. 2022-04-02 13:58:13 +09:00
nagachika 2ec864d9b7 merge revision(s) 9f0c6f20c5: [Backport #18382]
[Bug #18382] Fix crash in compaction for
	 ObjectSpace.trace_object_allocations

	ObjectSpace.trace_object_allocations can crash when auto-compaction is
	enabled.
	---
	 ext/objspace/object_tracing.c | 3 ++-
	 1 file changed, 2 insertions(+), 1 deletion(-)
2022-03-12 14:43:41 +09:00
nagachika 951e1377c1 merge revision(s) c51b92c18d: [Backport #18358]
[ruby/zlib] [Bug #18358] Fix crash in zlib when in progress

	When Zlib::Inflate#inflate or Zlib::Deflate#deflate is called
	recursively inside the block, a crash can occur because of an
	use-after-free bug.

	https://github.com/ruby/zlib/commit/50fb8a0338
	---
	 ext/zlib/zlib.c        | 117 ++++++++++++++++++++++++++++++++-----------------
	 test/zlib/test_zlib.rb |  10 ++++-
	 2 files changed, 85 insertions(+), 42 deletions(-)
2022-02-19 15:15:04 +09:00
nagachika 49ed412060 merge revision(s) b3d62a77d9: [Backport #17803]
[ruby/zlib] Synchronize access to zstream to prevent segfault in
	 multithreaded use

	I'm not sure whether this handles all multithreaded use cases,
	but this handles the example that crashes almost immediately
	and does 10,000,000 total deflates using 100 separate threads.

	To prevent the tests from taking forever, the committed test
	for this uses only 10,000 deflates across 10 separate threads,
	which still causes a segfault in the previous implementation
	almost immediately.

	Fixes [Bug #17803]

	https://github.com/ruby/zlib/commit/4b1023b3f2
	---
	 ext/zlib/zlib.c        | 33 ++++++++++++++++++++++++++-
	 test/zlib/test_zlib.rb | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 93 insertions(+), 1 deletion(-)
2022-02-19 14:36:41 +09:00
nagachika ebbe2fc923 merge revision(s) cf831f49189c4a890da6845e39199a5dfaf4fb48,3260602fa3d905ba310b9afbc5365ee52cb53d62:
zlib: fix Gzip{Writer,Reader}.new fails with a O_TMPFILE file

	---
	 ext/zlib/zlib.c        | 18 ++++++++++++++----
	 test/zlib/test_zlib.rb | 21 +++++++++++++++++++++
	 2 files changed, 35 insertions(+), 4 deletions(-)

	Adjusted indents [ci skip]

	---
	 ext/zlib/zlib.c | 10 +++++-----
	 1 file changed, 5 insertions(+), 5 deletions(-)
2022-02-19 14:33:05 +09:00
nagachika 4868d4b439 merge revision(s) fa7a712d46:
Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFE

	* See [Feature #17752]
	---
	 ext/cgi/escape/escape.c  | 2 +-
	 ext/monitor/monitor.c    | 2 +-
	 ext/racc/cparse/cparse.c | 2 +-
	 ext/zlib/zlib.c          | 2 +-
	 4 files changed, 4 insertions(+), 4 deletions(-)
2022-02-19 14:25:50 +09:00
nagachika 5c15cecfbf merge revision(s) 0c5f8c6276: [Backport #10961]
[ruby/zlib] Resume zstream if available [Bug #10961]

	---
	 ext/zlib/zlib.c | 6 ++++++
	 1 file changed, 6 insertions(+)
2022-02-19 14:19:22 +09:00
nagachika 3fb7d2cadc Fix integer overflow
Make use of the check in rb_alloc_tmp_buffer2.

    https://hackerone.com/reports/1328463

    When parsing cookies, only decode the values

    Bump version

    Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
    Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
2021-11-24 20:12:15 +09:00
Hiroshi SHIBATA d1e3dd4db1 Merge date-3.1.3 2021-11-24 19:46:22 +09:00
nagachika 949af69408 merge revision(s) 5680c38c75aeb5cbd219aafa8eb48c315f287d97,f5d20411386ff2552ff27661387ddc4bae1ebc30: [Backport #17573]
Use valid `ec` for postponed job.

	Postponed job can be registered from non-Ruby thread, which means
	`ec` in TLS can be NULL. In this case, use main thread's `ec` instead.

	See https://github.com/ruby/ruby/pull/4108
	and https://github.com/ruby/ruby/pull/4336
	---
	 vm_trace.c | 16 ++++++++++++----
	 1 file changed, 12 insertions(+), 4 deletions(-)

	Avoid assert failure when NULL EC is expected

	After 5680c38c75, postponed job APIs now
	expect to be called on native threads not managed by Ruby and handles
	getting a NULL execution context. However, in debug builds the change
	runs into an assertion failure with GET_EC() which asserts that EC is
	non-NULL. Avoid the assertion failure by passing `false` for `expect_ec`
	instead as the intention is to handle when there is no EC.

	Add a test from John Crepezzi and John Hawthorn to exercise this
	situation.

	See GH-4108
	See GH-5094

	[Bug #17573]

	Co-authored-by: John Hawthorn <john@hawthorn.email>
	Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
	---
	 ext/-test-/postponed_job/postponed_job.c       | 31 ++++++++++++++++++++++++++
	 test/-ext-/postponed_job/test_postponed_job.rb |  7 ++++++
	 vm_trace.c                                     |  2 +-
	 3 files changed, 39 insertions(+), 1 deletion(-)
2021-11-23 14:52:30 +09:00
Hiroshi SHIBATA 5afefe4371 Bump psych version to 3.3.2 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA 6775e9a21b Bump strscan version to 3.0.1 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA d9a1f14805 Bump date version to 3.1.1 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA 8cdb0ebb55 Bump etc version to 1.3.0 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA bfed3296ec Bump io-wait version to 0.2.0 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA 4716a8e157 Bump fiddle version to 1.0.8 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA e6fced73e5 Bump stringio version to 3.0.1 2021-11-22 10:51:35 +09:00
Hiroshi SHIBATA f96517ec2b [ruby/fcntl] Bump up fcntl version to 1.0.1
https://github.com/ruby/fcntl/commit/0bcc0c4518
2021-10-30 20:53:12 +09:00
Hiroshi SHIBATA e5babb16a1 Bump up zlib version to 2.0.0 2021-10-30 20:53:12 +09:00
Kazuki Yamaguchi 00e89fe36b openssl: import v2.2.1
Bring the local copy of ruby/openssl in sync with the upstream gem
release v2.2.1. The commits happened in the upstream repository can be
found at:

	https://github.com/ruby/openssl/compare/v2.2.0...v2.2.1

Note that many of these have already been applied to ruby.git and don't
appear in the file changes of this commit.
2021-10-30 20:22:06 +09:00
nagachika 7b55ff21b5 merge revision(s) 564ccd095a: [Backport #17756]
[ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when
	 `String#byteslice` returns non string value [Bug #17756] (#20)

	https://github.com/ruby/strscan/commit/92961cde2b
	---
	 ext/strscan/strscan.c              |  5 +----
	 test/strscan/test_stringscanner.rb | 17 +++++++++++++++++
	 2 files changed, 18 insertions(+), 4 deletions(-)
2021-09-18 16:11:19 +09:00
nagachika c42208f8e2 merge revision(s) c0f4e4ca6d: [Backport #18007]
undefine alloc functions for C extensions

	per guidance in doc/extension.rdoc, these classes now undefine their
	alloc functions:

	- ObjectSpace::InternalObjectWrapper
	- Socket::Ifaddr
	---
	 ext/objspace/objspace.c | 1 +
	 ext/socket/ifaddr.c     | 1 +
	 2 files changed, 2 insertions(+)
2021-09-05 14:55:14 +09:00
nagachika 911e75f054 add dependency for ext/-test-/array/concat/to_ary_conact.c 2021-09-05 13:49:07 +09:00
nagachika 92846db686 merge revision(s) cd4f5b13228879d954fa97b6aa479c4a5ef4fb0a,8db269edb3550a85dfab9b193ea115ca36912ced,ab63f6d8543903f177c46634f38e5428655f003b: [Backport #18140]
Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	[ruby-core:105099] [Bug #18140]
	---
	 array.c                 | 1 +
	 test/ruby/test_array.rb | 6 ++++++
	 2 files changed, 7 insertions(+)

	Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	Thanks @jhaberman for the test case

	[ruby-core:105099] [Bug #18140]
	---
	 ext/-test-/array/concat/depend          | 321 ++++++++++++++++++++++++++++++++
	 ext/-test-/array/concat/extconf.rb      |   2 +
	 ext/-test-/array/concat/to_ary_conact.c |  64 +++++++
	 test/-ext-/array/test_to_ary_concat.rb  |  20 ++
	 4 files changed, 407 insertions(+)
	 create mode 100644 ext/-test-/array/concat/depend
	 create mode 100644 ext/-test-/array/concat/extconf.rb
	 create mode 100644 ext/-test-/array/concat/to_ary_conact.c
	 create mode 100644 test/-ext-/array/test_to_ary_concat.rb

	Refined test [Bug #18140]

	---
	 ext/-test-/array/concat/to_ary_conact.c | 48 +++++++--------------------------
	 test/ruby/test_array.rb                 |  5 +++-
	 2 files changed, 13 insertions(+), 40 deletions(-)
2021-09-05 12:19:53 +09:00
nagachika c4b602e80f merge revision(s) 25e56fe374478a2266ac25f22a07bb3c6a423c83,8758b07b1e4fd636dffb4b442388a3033c63d4b5,791e8eec66d3aebcee36c1369b0bf52bc3815e94: [Backport #18016]
[ruby/fiddle] Fix Win32Types for Windows 64-bit (#63)

	https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types

	https://github.com/ruby/fiddle/commit/28ee5b1608
	---
	 ext/fiddle/lib/fiddle/types.rb | 8 ++++----
	 1 file changed, 4 insertions(+), 4 deletions(-)

	[ruby/fiddle] Fix more Win32Types definitions

	https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types

	https://github.com/ruby/fiddle/commit/805c1a595a
	---
	 ext/fiddle/lib/fiddle/types.rb | 23 ++++++++++++-----------
	 1 file changed, 12 insertions(+), 11 deletions(-)

	[ruby/fiddle] win32types: sort

	https://github.com/ruby/fiddle/commit/35dec6c5a5
	---
	 ext/fiddle/lib/fiddle/types.rb | 30 +++++++++++++++---------------
	 1 file changed, 15 insertions(+), 15 deletions(-)
2021-07-18 11:22:50 +09:00
nagachika b93a2d9d2c merge revision(s) 391abc543cea118a9cd7d6310acadbfa352668ef,e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c,f6539202c52a051a4e6946a318a1d9cd29002990: [Backport #12052]
Scan the coderange in the given encoding

	---
	 ext/-test-/string/enc_str_buf_cat.c       | 14 ++++++++++++++
	 string.c                                  | 32 ++++++++++++++++++++++---------
	 test/-ext-/string/test_enc_str_buf_cat.rb |  9 +++++++++
	 3 files changed, 46 insertions(+), 9 deletions(-)

	Work around issue transcoding issue with non-ASCII compatible
	 encodings and xml escaping

	When using a non-ASCII compatible source and destination encoding
	and xml escaping (the :xml option to String#encode), the resulting
	string was broken, as it used the correct non-ASCII compatible
	encoding, but contained data that was ASCII-compatible instead of
	compatible with the string's encoding.

	Work around this issue by detecting the case where both the
	source and destination encoding are non-ASCII compatible, and
	transcoding the source string from the non-ASCII compatible
	encoding to UTF-8. The xml escaping code will correctly handle
	the UTF-8 source string and the return the correctly encoded
	and escaped value.

	Fixes [Bug #12052]

	Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
	---
	 test/ruby/test_transcode.rb | 19 +++++++++++++++++++
	 transcode.c                 |  6 ++++++
	 2 files changed, 25 insertions(+)

	=?UTF-8?q?-=20add=20regression=20tests=20for=20U+6E7F=20(?=
	 =?UTF-8?q?=E6=B9=BF)=20in=20ISO-2022-JP?=
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	  In ISO-2022-JP, the bytes use to code are the same as those for "<>".
	  This adds regression tests to make sure that these bytes, when representing
	  湿, are NOT escaped with encode("ISO-2022-JP, xml: :text) or similar.
	  These are additional regression tests for #12052.
	---
	 test/ruby/test_transcode.rb | 3 +++
	 1 file changed, 3 insertions(+)
2021-07-18 11:19:13 +09:00
nagachika fc73fc79cb merge revision(s) 1ad2224773: [Backport #17625]
[ruby/openssl] Fixed the results of
	 OpenSSL::Timestamp::Response#failure_info

	Made stored values `Symbol`s instead of `ID`s.

	Fixes https://bugs.ruby-lang.org/issues/17625

	Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>

	https://github.com/ruby/openssl/commit/f2d004679a
	---
	 ext/openssl/ossl_ts.c   | 22 +++++++++++-----------
	 test/openssl/test_ts.rb |  5 +++++
	 2 files changed, 16 insertions(+), 11 deletions(-)
2021-05-23 14:40:20 +09:00
nagachika f9196de1de merge revision(s) 3a3b19b2bb: [Backport #17827]
Fix Monitor to lock per Fiber, like Mutex [Bug #17827]

	---
	 ext/monitor/monitor.c        | 10 +++++-----
	 test/monitor/test_monitor.rb |  7 +++++++
	 2 files changed, 12 insertions(+), 5 deletions(-)
2021-05-23 14:36:05 +09:00
NARUSE, Yui 4e2738f477 merge revision(s) 7e8a9af9db: [Backport #17732]
rb_enc_interned_str: handle autoloaded encodings

	If called with an autoloaded encoding that was not yet
	initialized, `rb_enc_interned_str` would crash with
	a NULL pointer exception.

	See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
	---
	 encoding.c                        | 28 ++++++++++++----------------
	 ext/-test-/string/depend          |  3 +++
	 ext/-test-/string/fstring.c       | 15 +++++++++++++++
	 internal/encoding.h               |  3 +++
	 string.c                          |  4 ++++
	 test/-ext-/string/test_fstring.rb | 16 ++++++++++++++++
	 6 files changed, 53 insertions(+), 16 deletions(-)
2021-04-02 16:06:31 +09:00
NARUSE, Yui e050dd5323 merge revision(s) f6d5de8f33: [Backport #17659]
[ruby/io-wait] Declare as Ractor-safe

	Fixes https://bugs.ruby-lang.org/issues/17659

	https://github.com/ruby/io-wait/commit/ba338b4764
	---
	 ext/io/wait/wait.c          |  4 ++++
	 test/io/wait/test_ractor.rb | 22 ++++++++++++++++++++++
	 2 files changed, 26 insertions(+)
	 create mode 100644 test/io/wait/test_ractor.rb
2021-03-13 17:56:17 +09:00
b20e2c3f2a Backport io-console 0.5.7 to Ruby 3.0 (#4252)
* [ruby/io-console] [DOC] Note that IO#getpass returns a chomped string

IO#getpass uses String#chomp! on the read input line.

https://github.com/ruby/io-console/commit/1e98c93bc8

* [ruby/io-console] Ignore chomp! result and return the modified string

https://github.com/ruby/io-console/commit/09e5ccc729

* [ruby/io-console] Pre-define chomp! ID

https://github.com/ruby/io-console/commit/028e1c9497

* [ruby/io-console] Shrink struct query_args

https://github.com/ruby/io-console/commit/720be0a3e5

* [ruby/io-console] bump up to 0.5.7

https://github.com/ruby/io-console/commit/f55d7ebff6

Co-authored-by: Marcus Stollsteimer <sto.mar@web.de>
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-03-13 17:55:49 +09:00
NARUSE, Yui a6dec2e144 merge revision(s) 5de38c41ae: [Backport #17644]
ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug
	 #17644]

	---
	 ext/ripper/lib/ripper/lexer.rb |  2 +-
	 test/ripper/test_lexer.rb      | 12 ++++++++++++
	 2 files changed, 13 insertions(+), 1 deletion(-)
2021-03-02 18:28:30 +09:00
NARUSE, Yui 3cebc70953 merge revision(s) 9241211538: [Backport #17589]
Forward keyword arguments for Pathname#each_line [Bug #17589]

	---
	 ext/pathname/pathname.c        |  4 ++--
	 test/pathname/test_pathname.rb | 26 ++++++++++++++++++++++++++
	 2 files changed, 28 insertions(+), 2 deletions(-)
2021-02-02 17:50:36 +09:00
NARUSE, Yui c09f5ee344 merge revision(s) 6ca3d1af33: [Backport #17552]
objspace_dump.c: Handle allocation path and line missing

	---
	 ext/objspace/objspace_dump.c | 13 +++++++++----
	 1 file changed, 9 insertions(+), 4 deletions(-)
2021-02-02 15:47:50 +09:00
NARUSE, Yui 17986daf6e merge revision(s) b84b253a69: [Backport #17547]
Fix Ripper with heredoc.

	---
	 ext/ripper/lib/ripper/lexer.rb |  1 +
	 test/ripper/test_lexer.rb      | 10 ++++++++++
	 2 files changed, 11 insertions(+)
2021-02-01 23:07:02 +09:00
Masaki Matsushita 21340303c2 Fix compile error of sockssocket
The patch is provided by PhobosK (Phobos Kappa).

This should be backported to Ruby 3.0.

[Feature #17187]
2021-01-24 18:33:20 +09:00
58509767d1 Backport lib/reline, ext/readline, and lib/irb for 3.0.1 (#4085)
* Get rid of inconsistent dll linkages against vcpkg readline

* [ruby/irb] Enhance colored inspect output

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

* [ruby/irb] Add color_printer.rb to gemspec

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

* [ruby/irb] Fix failing tests

https://github.com/ruby/irb/commit/7723ade899

* irb: add more syntax errors colorizing support (#3967)

* [ruby/irb] Do not colorize partially-correct inspect

This is to prevent a yellow-mixed output for ActiveSupport::TimeWithZone.

Follows up https://github.com/ruby/irb/pull/159 and https://github.com/ruby/ruby/pull/3967.

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

* [ruby/irb] Remove unnecessary ignore_error in dispatch_seq

Just forgotten in https://github.com/ruby/irb/commit/a5804c3560bb1de3ea8e40002635bff87f6a2825

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

* Increase timeout for reline with --jit-wait

for failures like:
http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20201229-130509
http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20201229-165132
http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20201228-015519

* [ruby/irb] Stringify when a non-object is passed to PP#text

If a nested object is passed to #pp, it may be sometimes passed to the #text
method as an object without being stringified.

This is fixed on the Ruby main repository;
https://github.com/ruby/ruby/commit/433a3be86a811de0b4adbb92e054ee3a6fc6b4d8
but it was a bug of Ripper so still needs this workaround for using irb
as a gem on Ruby 3.0.0 or earlier.

Co-authored-by: k0kubun <takashikkbn@gmail.com>

https://github.com/ruby/irb/commit/8d13df22ee

* [ruby/irb] Newline in oneliner def doesn't reset indent

This closes ruby/irb#132.

https://github.com/ruby/irb/commit/43456dcf5e

* [ruby/irb] Escape invalid byte sequence in Exception

This fixes ruby/irb#141.

https://github.com/ruby/irb/commit/0815317d42

* [ruby/irb] Handle indentations related to keyword "do" correctly

This fixes ruby/irb#158.

https://github.com/ruby/irb/commit/964643400b

* [ruby/irb] Heredoc may contain multiple newlines in a single token

Use the start token as the indentation criteria so that it works properly in
heredoc.

ref. https://github.com/ruby/reline/pull/242

https://github.com/ruby/irb/commit/9704808dfd

* [ruby/irb] Use Ripper::Lexer#scan to take broken tokens

ref. https://github.com/ruby/reline/pull/242

https://github.com/ruby/irb/commit/54f90cb6c9

* [ruby/irb] Use error tokens if there are no correct tokens in the same place

For example, the broken code "%www" will result in only one error token.

https://github.com/ruby/irb/commit/9fa39a7cf3

* [ruby/irb] Ensure to restore $VERBOSE

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

* 600x larger timeout for Reline

I didn't notice it's msec. 2.5s is too short.
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3311385

* [ruby/irb] fix typo in `IRB::Irb#convert_invalid_byte_sequence`

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

* [ruby/irb] do not escape a predicate method for doc namespace

* Fixes #88

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

* [ruby/irb] refactoring an error handling in `IRB::Inspector`

* moved rescue clause to `#inspect_value` to catch all failures in inspectors
* test with all (currently five kind of) inspect modes
  - tweaked the input due to only `Marshal` can inspect(dump) a `BasicObject`

https://github.com/ruby/irb/commit/9d112fab8e

* [ruby/irb] Use Exception#full_message to show backtrace in the correct order

[Bug #17466]

https://github.com/ruby/irb/commit/1c76845cca

* [ruby/irb] Fix BACK_TRACE_LIMIT logic

https://github.com/ruby/irb/commit/30dc5d43fe

* irb: Drop lines from backtrace for tests in Ruby repository

* [ruby/reline] Update cursor correctly when just cursor moving

This fixes ruby/reline#236 and ruby/reline#239.

https://github.com/ruby/reline/commit/3e3c89d00b

* [ruby/reline] Correct var names in Reline were different from vi-*-mode-string

https://github.com/ruby/reline/commit/8255fc93b9

* [ruby/reline] Remove debug print

https://github.com/ruby/reline/commit/d7fbaedc6a

* [ruby/reline] Suppress crashing when auto_indent_proc returns broken indent info

Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/7c24276275

* [ruby/reline] Suppress crashing when dynamic_prompt_proc returns a broken prompt list

Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/558f7be168

* [ruby/reline] Suppress auto indent for adding newlines in pasting

Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/074bb017a7

* [ruby/reline] Add acknowledgments and license for rb-readline

https://github.com/ruby/reline/commit/19df59b916

* [ruby/irb] Fix comment, irb gem supports 2.5.0 or older

https://github.com/ruby/irb/commit/36118015ba

* should use `assert_include` here.

Random ordering test can introduce antoher candidate so it should be
`assert_include`.

* [ruby/irb] Add missing require

This is useful if you want to use IRB::ColorPrinter as a library like:

```
begin
  require 'irb/color_printer'
  IRB::ColorPrinter.pp(obj)
rescue LoadError
  pp(obj)
end
```

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

* [ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.pp

The incompatible interface is not helpful, again if you want to use it
as a standalone library, falling it back to PP.

Original PP.pp also ends with `out << "\n"`.

https://github.com/ruby/irb/commit/4c74c7d84c

* Suppress constant redefinition warnings

* Fix the failing test with XDG_CONFIG_HOME

* [ruby/irb] Version 1.3.1

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

* [ruby/reline] Handle ed_search_{prev,next}_history in multiline correctly

The current line was being handled incorrectly when displaying the hit
history, so it has been fixed to be correct.

https://github.com/ruby/reline/commit/a3df4343b3

* [ruby/reline] Move the cursor correctly when deleting at eol

This fixes ruby/reline#246.

https://github.com/ruby/reline/commit/07a73ba601

* [ruby/reline] Version 0.2.1

https://github.com/ruby/reline/commit/a3b3c6ee60

* [ruby/reline] Initialize a variable just in case

https://github.com/ruby/reline/commit/29b10f6e98

* [ruby/reline] Tests with yamatanooroti don't need chdir

Because of chdir, log files ware created in temporary directries on Windows.

https://github.com/ruby/reline/commit/200b469a68

* [ruby/reline] Windows needs more times to wait rendering

https://github.com/ruby/reline/commit/53ff2b09c7

* [ruby/reline] Support for change in Windows-specific behavior at eol

The behavior of automatically moving the cursor to the next line when
displaying a char at the eol on Windows suddenly disappeared.

https://github.com/ruby/reline/commit/cad4de6ee8

* [ruby/reline] Reline::Windows.erase_after_cursor erases attributes too

https://github.com/ruby/reline/commit/68b961dfc7

* [ruby/irb] [ruby/irb] [ruby/reline] Version 0.2.2

https://github.com/ruby/reline/commit/dfb710946f

https://github.com/ruby/irb/commit/1a1cdf9628

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

* [ruby/irb] handle `__ENCODING__` as a keyword as well

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

* [ruby/irb] handle repeated exception separately

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

* [ruby/irb] skip a failling test on TruffleRuby

* due to the difference of backtrace pointed out by @aycabta

https://github.com/ruby/irb/commit/5e00a0ae61

* [ruby/irb] Version 1.3.2

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

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Nobuhiro IMAI <nov@yo.rim.or.jp>
Co-authored-by: Koichi Sasada <ko1@atdot.net>
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2021-01-19 13:01:31 +09:00
Koichi Sasada b93e16dc0f enable constant cache on ractors
constant cache `IC` is accessed by non-atomic manner and there are
thread-safety issues, so Ruby 3.0 disables to use const cache on
non-main ractors.

This patch enables it by introducing `imemo_constcache` and allocates
it by every re-fill of const cache like `imemo_callcache`.
[Bug #17510]

Now `IC` only has one entry `IC::entry` and it points to
`iseq_inline_constant_cache_entry`, managed by T_IMEMO object.

`IC` is atomic data structure so `rb_mjit_before_vm_ic_update()` and
`rb_mjit_after_vm_ic_update()` is not needed.
2021-01-13 17:06:16 +09:00
Nobuyoshi Nakada 66719d7dc8 etc: use atomic operation instead of mutex 2020-12-24 11:43:21 +09:00
Nobuyoshi Nakada 6ed6b85ece Expose atomic operation macros with RUBY prefix
Now we need atomic operations, which are lighter than mutex, more
widely for extension libraries because of Ractor.
2020-12-24 11:43:21 +09:00
Kenta Murata 94015200b6 [fiddle] Update to 1.0.6 2020-12-23 23:40:04 +09:00