Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ jobs:
- { name: disable-dln, env: { append_configure: '--disable-dln' } }
- { name: enable-mkmf-verbose, env: { append_configure: '--enable-mkmf-verbose' } }
- { name: disable-rubygems, env: { append_configure: '--disable-rubygems' } }
- { name: RUBY_DEVEL, env: { append_configure: '--enable-devel' } }

- { name: OPT_THREADED_CODE=1, env: { cppflags: '-DOPT_THREADED_CODE=1' } }
- { name: OPT_THREADED_CODE=2, env: { cppflags: '-DOPT_THREADED_CODE=2' } }
- { name: OPT_THREADED_CODE=3, env: { cppflags: '-DOPT_THREADED_CODE=3' } }

- { name: NDEBUG, env: { cppflags: '-DNDEBUG' } }
- { name: RUBY_DEBUG, env: { cppflags: '-DRUBY_DEBUG' } }
- { name: RUBY_DEVEL, env: { cppflags: '-DRUBY_DEVEL' } }
# - { name: ARRAY_DEBUG, env: { cppflags: '-DARRAY_DEBUG' } }
# - { name: BIGNUM_DEBUG, env: { cppflags: '-DBIGNUM_DEBUG' } }
# - { name: CCAN_LIST_DEBUG, env: { cppflags: '-DCCAN_LIST_DEBUG' } }
Expand Down
5 changes: 4 additions & 1 deletion array.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,13 +1373,16 @@ ary_make_partial_step(VALUE ary, VALUE klass, long offset, long len, long step)
const VALUE *values = RARRAY_CONST_PTR_TRANSIENT(ary);
const long orig_len = len;

if ((step > 0 && step >= len) || (step < 0 && (step < -len))) {
if (step > 0 && step >= len) {
VALUE result = ary_new(klass, 1);
VALUE *ptr = (VALUE *)ARY_EMBED_PTR(result);
RB_OBJ_WRITE(result, ptr, values[offset]);
ARY_SET_EMBED_LEN(result, 1);
return result;
}
else if (step < 0 && step < -len) {
step = -len;
}

long ustep = (step < 0) ? -step : step;
len = (len + ustep - 1) / ustep;
Expand Down
12 changes: 6 additions & 6 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -687,18 +687,18 @@ realclean-platform: distclean-platform
realclean-spec: distclean-spec
realclean-rubyspec: realclean-spec

clean-ext:: ext/clean gems/clean timestamp/clean
distclean-ext:: ext/distclean gems/distclean timestamp/distclean
realclean-ext:: ext/realclean gems/realclean timestamp/realclean
clean-ext:: ext/clean .bundle/clean timestamp/clean
distclean-ext:: ext/distclean .bundle/distclean timestamp/distclean
realclean-ext:: ext/realclean .bundle/realclean timestamp/realclean

ext/clean.mk ext/distclean.mk ext/realclean.mk::
ext/clean:: ext/clean.mk
ext/distclean:: ext/distclean.mk
ext/realclean:: ext/realclean.mk

timestamp/clean:: ext/clean gems/clean
timestamp/distclean:: ext/distclean gems/distclean
timestamp/realclean:: ext/realclean gems/realclean
timestamp/clean:: ext/clean .bundle/clean
timestamp/distclean:: ext/distclean .bundle/distclean
timestamp/realclean:: ext/realclean .bundle/realclean

timestamp/clean timestamp/distclean timestamp/realclean::
$(Q)$(RM) $(TIMESTAMPDIR)/.*.time $(TIMESTAMPDIR)/$(arch)/.time
Expand Down
10 changes: 7 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,13 @@ AS_IF([test "$fdeclspec" = yes], [
RUBY_APPEND_OPTIONS(CXXFLAGS, -fdeclspec)
])

AS_IF([test "x$RUBY_DEVEL" != xyes], [RUBY_DEVEL=no])
particular_werror_flags=$RUBY_DEVEL
AC_ARG_ENABLE(devel,
AS_HELP_STRING([--enable-devel], [enable development build]),
[RUBY_DEVEL=$enableval],
[AS_IF([test "x${RUBY_DEVEL-no}" != xyes], [RUBY_DEVEL=])]
)dnl
AC_SUBST(RUBY_DEVEL)
particular_werror_flags=${RUBY_DEVEL:-no}
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--disable-werror],
[don't make warnings into errors
Expand Down Expand Up @@ -867,7 +872,6 @@ AS_IF([test "$GCC" = yes], [
test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
])
test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
AS_IF([test "x$RUBY_DEVEL" = xyes], [RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_DEVEL=1)])

AS_IF([test "$GCC" = ""], [
AS_CASE(["$target_os"],[aix*],[warnflags="$warnflags -qinfo=por" rb_cv_warnflags="$rb_cv_warnflags -qinfo=por"])
Expand Down
Loading