Skip to content

Commit 092e48d

Browse files
committed
Updated version 2.3.3 from 'upstream/2.3.3'
with Debian dir bc43c55
2 parents b3174b8 + 4049490 commit 092e48d

File tree

473 files changed

+4027
-1803
lines changed

Some content is hidden

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

473 files changed

+4027
-1803
lines changed

ChangeLog

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

array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4461,7 +4461,7 @@ flatten(VALUE ary, int level, int *modified)
44614461

44624462
st_free_table(memo);
44634463

4464-
RBASIC_SET_CLASS(result, rb_class_of(ary));
4464+
RBASIC_SET_CLASS(result, rb_obj_class(ary));
44654465
return result;
44664466
}
44674467

bignum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6263,7 +6263,7 @@ rb_big_fdiv(VALUE x, VALUE y)
62636263
*
62646264
* 123456789 ** 2 #=> 15241578750190521
62656265
* 123456789 ** 1.2 #=> 5126464716.09932
6266-
* 123456789 ** -2 #=> 6.5610001194102e-17
6266+
* 123456789 ** -2 #=> (1/15241578750190521)
62676267
*/
62686268

62696269
VALUE
@@ -6804,7 +6804,7 @@ rb_big_aref(VALUE x, VALUE y)
68046804
* See also Object#hash.
68056805
*/
68066806

6807-
static VALUE
6807+
VALUE
68086808
rb_big_hash(VALUE x)
68096809
{
68106810
st_index_t hash;

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ configure-ext: $(EXTS_MK)
201201

202202
build-ext: $(EXTS_MK)
203203
$(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
204-
ENCOBJS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
204+
EXTENCS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
205205

206206
prog: program wprogram
207207

compile.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ r_value(VALUE value)
252252
#define ADD_TRACE(seq, line, event) \
253253
do { \
254254
if ((event) == RUBY_EVENT_LINE && ISEQ_COVERAGE(iseq) && \
255+
(line) > 0 && \
255256
(line) != ISEQ_COMPILE_DATA(iseq)->last_coverable_line) { \
256257
RARRAY_ASET(ISEQ_COVERAGE(iseq), (line) - 1, INT2FIX(0)); \
257258
ISEQ_COMPILE_DATA(iseq)->last_coverable_line = (line); \
@@ -2239,6 +2240,13 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
22392240
/*case BIN(trace):*/
22402241
next = next->next;
22412242
break;
2243+
case BIN(jump):
2244+
/* if cond
2245+
* return tailcall
2246+
* end
2247+
*/
2248+
next = get_destination_insn((INSN *)next);
2249+
break;
22422250
case BIN(leave):
22432251
piobj = iobj;
22442252
default:

complex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ rb_complex_set_real(VALUE cmp, VALUE r)
14141414
VALUE
14151415
rb_complex_set_imag(VALUE cmp, VALUE i)
14161416
{
1417-
RCOMPLEX_SET_REAL(cmp, i);
1417+
RCOMPLEX_SET_IMAG(cmp, i);
14181418
return cmp;
14191419
}
14201420

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,7 @@ AS_CASE("$enable_shared", [yes], [
36863686
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
36873687
],
36883688
[linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku*], [
3689-
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS $LDFLAGS_OPTDIR"
3689+
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
36903690
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
36913691
if test "$load_relative" = yes; then
36923692
libprefix="'\$\${ORIGIN}/../${libdir_basename}'"

cont.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ cont_new(VALUE klass)
476476

477477
static VALUE
478478
cont_capture(volatile int *stat)
479+
#if defined(__clang__) && \
480+
__clang_major__ == 3 && __clang_minor__ == 8 && __clang_patch__ == 0
481+
__attribute__ ((optnone))
482+
#endif
479483
{
480484
rb_context_t *cont;
481485
rb_thread_t *th = GET_THREAD();

dir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,8 @@ dir_rewind(VALUE dir)
885885
* call-seq:
886886
* dir.close -> nil
887887
*
888-
* Closes the directory stream. Any further attempts to access
889-
* <em>dir</em> will raise an <code>IOError</code>.
888+
* Closes the directory stream.
889+
* Calling this method on closed Dir object is ignored since Ruby 2.3.
890890
*
891891
* d = Dir.new("testdir")
892892
* d.close #=> nil

encoding.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ rb_enc_associate_index(VALUE obj, int idx)
843843
}
844844
termlen = rb_enc_mbminlen(enc);
845845
oldtermlen = rb_enc_mbminlen(rb_enc_from_index(oldidx));
846-
if (oldtermlen < termlen && RB_TYPE_P(obj, T_STRING)) {
847-
rb_str_fill_terminator(obj, termlen);
846+
if (oldtermlen != termlen && RB_TYPE_P(obj, T_STRING)) {
847+
rb_str_change_terminator_length(obj, oldtermlen, termlen);
848848
}
849849
enc_set_index(obj, idx);
850850
return obj;

0 commit comments

Comments
 (0)