Skip to content

Commit 7ff0c3d

Browse files
committed
New upstream version 3.2.2
1 parent 7b01c16 commit 7ff0c3d

File tree

221 files changed

+3899
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+3899
-626
lines changed

ChangeLog

Lines changed: 544 additions & 0 deletions
Large diffs are not rendered by default.

compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13062,7 +13062,7 @@ ibf_dump_memsize(const void *ptr)
1306213062
static const rb_data_type_t ibf_dump_type = {
1306313063
"ibf_dump",
1306413064
{ibf_dump_mark, ibf_dump_free, ibf_dump_memsize,},
13065-
0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY
13065+
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
1306613066
};
1306713067

1306813068
static void

configure

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8235,39 +8235,6 @@ else $as_nop
82358235
as_fn_error $? "Unsupported OS X version is required" "$LINENO" 5
82368236
fi
82378237
rm -f conftest.err conftest.i conftest.$ac_ext
8238-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if thread-local storage is supported" >&5
8239-
printf %s "checking if thread-local storage is supported... " >&6; }
8240-
if test ${rb_cv_tls_supported+y}
8241-
then :
8242-
printf %s "(cached) " >&6
8243-
else $as_nop
8244-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8245-
/* end confdefs.h. */
8246-
int __thread conftest;
8247-
int
8248-
main (void)
8249-
{
8250-
8251-
;
8252-
return 0;
8253-
}
8254-
_ACEOF
8255-
if ac_fn_c_try_link "$LINENO"
8256-
then :
8257-
rb_cv_tls_supported=yes
8258-
else $as_nop
8259-
rb_cv_tls_supported=no
8260-
fi
8261-
rm -f core conftest.err conftest.$ac_objext conftest.beam \
8262-
conftest$ac_exeext conftest.$ac_ext
8263-
fi
8264-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rb_cv_tls_supported" >&5
8265-
colorize_result "$rb_cv_tls_supported" ; }
8266-
if test x"$rb_cv_tls_supported" != xyes
8267-
then :
8268-
printf "%s\n" "#define RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED 1" >>confdefs.h
8269-
8270-
fi
82718238
;; #(
82728239
*) :
82738240
;;
@@ -8350,6 +8317,40 @@ then :
83508317

83518318
as_fn_error $? "too old GCC: $gcc_major.$gcc_minor" "$LINENO" 5
83528319

8320+
fi
8321+
8322+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if thread-local storage is supported" >&5
8323+
printf %s "checking if thread-local storage is supported... " >&6; }
8324+
if test ${rb_cv_tls_supported+y}
8325+
then :
8326+
printf %s "(cached) " >&6
8327+
else $as_nop
8328+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8329+
/* end confdefs.h. */
8330+
int __thread conftest;
8331+
int
8332+
main (void)
8333+
{
8334+
8335+
;
8336+
return 0;
8337+
}
8338+
_ACEOF
8339+
if ac_fn_c_try_link "$LINENO"
8340+
then :
8341+
rb_cv_tls_supported=yes
8342+
else $as_nop
8343+
rb_cv_tls_supported=no
8344+
fi
8345+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
8346+
conftest$ac_exeext conftest.$ac_ext
8347+
fi
8348+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rb_cv_tls_supported" >&5
8349+
colorize_result "$rb_cv_tls_supported" ; }
8350+
if test x"$rb_cv_tls_supported" != xyes
8351+
then :
8352+
printf "%s\n" "#define RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED 1" >>confdefs.h
8353+
83538354
fi
83548355

83558356
else $as_nop

configure.ac

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,6 @@ AS_CASE(["$target_os"],
366366
[AC_MSG_RESULT(yes)],
367367
[AC_MSG_RESULT(no)
368368
AC_MSG_ERROR([Unsupported OS X version is required])])
369-
AC_CACHE_CHECK([if thread-local storage is supported], [rb_cv_tls_supported],
370-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[int __thread conftest;]])],
371-
[rb_cv_tls_supported=yes],
372-
[rb_cv_tls_supported=no])])
373-
AS_IF([test x"$rb_cv_tls_supported" != xyes],
374-
[AC_DEFINE(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)])
375369
])
376370

377371
RUBY_MINGW32
@@ -391,6 +385,13 @@ AS_IF([test "$GCC" = yes], [
391385
AS_IF([test "$gcc_major" -lt 4], [
392386
AC_MSG_ERROR([too old GCC: $gcc_major.$gcc_minor])
393387
])
388+
389+
AC_CACHE_CHECK([if thread-local storage is supported], [rb_cv_tls_supported],
390+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[int __thread conftest;]])],
391+
[rb_cv_tls_supported=yes],
392+
[rb_cv_tls_supported=no])])
393+
AS_IF([test x"$rb_cv_tls_supported" != xyes],
394+
[AC_DEFINE(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)])
394395
], [
395396
linker_flag=
396397
])

doc/syntax/literals.rdoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ the content. Note that empty lines and lines consisting solely of literal tabs
277277
and spaces will be ignored for the purposes of determining indentation, but
278278
escaped tabs and spaces are considered non-indentation characters.
279279

280+
For the purpose of measuring an indentation, a horizontal tab is regarded as a
281+
sequence of one to eight spaces such that the column position corresponding to
282+
its end is a multiple of eight. The amount to be removed is counted in terms
283+
of the number of spaces. If the boundary appears in the middle of a tab, that
284+
tab is not removed.
285+
280286
A heredoc allows interpolation and escaped characters. You may disable
281287
interpolation and escaping by surrounding the opening identifier with single
282288
quotes:

internal/thread.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ VALUE rb_get_coverages(void);
2929
int rb_get_coverage_mode(void);
3030
VALUE rb_default_coverage(int);
3131
VALUE rb_thread_shield_new(void);
32+
bool rb_thread_shield_owned(VALUE self);
3233
VALUE rb_thread_shield_wait(VALUE self);
3334
VALUE rb_thread_shield_release(VALUE self);
3435
VALUE rb_thread_shield_destroy(VALUE self);

internal/variable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ VALUE rb_gvar_defined(ID);
5757
void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
5858
rb_shape_t * rb_grow_iv_list(VALUE obj);
5959
void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize);
60-
struct gen_ivtbl * rb_ensure_generic_iv_list_size(VALUE obj, uint32_t newsize);
60+
struct gen_ivtbl *rb_ensure_generic_iv_list_size(VALUE obj, rb_shape_t *shape, uint32_t newsize);
6161
attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val);
6262
MJIT_SYMBOL_EXPORT_END
6363

io_buffer.c

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,13 +2415,11 @@ rb_io_buffer_read(VALUE self, VALUE io, size_t length, size_t offset)
24152415
}
24162416

24172417
/*
2418-
* call-seq: read(io, [length, [offset]]) -> read length or -errno
2418+
* call-seq: read(io, length, [offset]) -> read length or -errno
24192419
*
24202420
* Read at most +length+ bytes from +io+ into the buffer, starting at
24212421
* +offset+. If an error occurs, return <tt>-errno</tt>.
24222422
*
2423-
* If +length+ is not given, read until the end of the buffer.
2424-
*
24252423
* If +offset+ is not given, read from the beginning of the buffer.
24262424
*
24272425
* If +length+ is 0, read nothing.
@@ -2447,14 +2445,10 @@ io_buffer_read(int argc, VALUE *argv, VALUE self)
24472445

24482446
VALUE io = argv[0];
24492447

2450-
size_t length;
2451-
if (argc >= 2) {
2452-
if (rb_int_negative_p(argv[1])) {
2453-
rb_raise(rb_eArgError, "Length can't be negative!");
2454-
}
2455-
2456-
length = NUM2SIZET(argv[1]);
2448+
if (rb_int_negative_p(argv[1])) {
2449+
rb_raise(rb_eArgError, "Length can't be negative!");
24572450
}
2451+
size_t length = NUM2SIZET(argv[1]);
24582452

24592453
size_t offset = 0;
24602454
if (argc >= 3) {
@@ -2660,14 +2654,10 @@ io_buffer_write(int argc, VALUE *argv, VALUE self)
26602654

26612655
VALUE io = argv[0];
26622656

2663-
size_t length;
2664-
if (argc >= 2) {
2665-
if (rb_int_negative_p(argv[1])) {
2666-
rb_raise(rb_eArgError, "Length can't be negative!");
2667-
}
2668-
2669-
length = NUM2SIZET(argv[1]);
2657+
if (rb_int_negative_p(argv[1])) {
2658+
rb_raise(rb_eArgError, "Length can't be negative!");
26702659
}
2660+
size_t length = NUM2SIZET(argv[1]);
26712661

26722662
size_t offset = 0;
26732663
if (argc >= 3) {

lib/bundler.rb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ module Bundler
3939
environment_preserver.replace_with_backup
4040
SUDO_MUTEX = Thread::Mutex.new
4141

42-
SAFE_MARSHAL_CLASSES = [Symbol, TrueClass, String, Array, Hash].freeze
43-
SAFE_MARSHAL_ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed.".freeze
42+
SAFE_MARSHAL_CLASSES = [Symbol, TrueClass, String, Array, Hash, Gem::Version, Gem::Specification].freeze
43+
SAFE_MARSHAL_ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed."
4444
SAFE_MARSHAL_PROC = proc do |object|
4545
object.tap do
4646
unless SAFE_MARSHAL_CLASSES.include?(object.class)
@@ -85,6 +85,7 @@ module Bundler
8585
autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
8686
autoload :UI, File.expand_path("bundler/ui", __dir__)
8787
autoload :URICredentialsFilter, File.expand_path("bundler/uri_credentials_filter", __dir__)
88+
autoload :URINormalizer, File.expand_path("bundler/uri_normalizer", __dir__)
8889

8990
class << self
9091
def configure
@@ -506,7 +507,7 @@ def which(executable)
506507
if File.file?(executable) && File.executable?(executable)
507508
executable
508509
elsif paths = ENV["PATH"]
509-
quote = '"'.freeze
510+
quote = '"'
510511
paths.split(File::PATH_SEPARATOR).find do |path|
511512
path = path[1..-2] if path.start_with?(quote) && path.end_with?(quote)
512513
executable_path = File.expand_path(executable, path)
@@ -525,12 +526,6 @@ def safe_load_marshal(data)
525526
load_marshal(data, :marshal_proc => SAFE_MARSHAL_PROC)
526527
end
527528

528-
def load_marshal(data, marshal_proc: nil)
529-
Marshal.load(data, marshal_proc)
530-
rescue TypeError => e
531-
raise MarshalError, "#{e.class}: #{e.message}"
532-
end
533-
534529
def load_gemspec(file, validate = false)
535530
@gemspec_cache ||= {}
536531
key = File.expand_path(file)
@@ -619,6 +614,12 @@ def self_manager
619614

620615
private
621616

617+
def load_marshal(data, marshal_proc: nil)
618+
Marshal.load(data, marshal_proc)
619+
rescue TypeError => e
620+
raise MarshalError, "#{e.class}: #{e.message}"
621+
end
622+
622623
def eval_yaml_gemspec(path, contents)
623624
Kernel.require "psych"
624625

lib/bundler/cli.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def self.handle_no_command_error(command, has_namespace = $thor_runner)
156156
dependency listed in the gemspec file to the newly created Gemfile.
157157
D
158158
method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
159+
method_option "gemfile", :type => :string, :banner => "Use the specified name for the gemfile instead of 'Gemfile'"
159160
def init
160161
require_relative "cli/init"
161162
Init.new(options.dup).run

0 commit comments

Comments
 (0)