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 common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ $(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(tooldir)/transcode-tblgen.rb
$(Q) $(BASERUBY) "$(tooldir)/transcode-tblgen.rb" -vo $@ $(srcdir)/enc/trans/newline.trans
enc/trans/newline.$(OBJEXT): $(NEWLINE_C)

verconf.h: $(srcdir)/template/verconf.h.tmpl $(tooldir)/generic_erb.rb $(RBCONFIG)
verconf.h: $(srcdir)/template/verconf.h.tmpl $(tooldir)/generic_erb.rb rbconfig.rb
$(ECHO) creating $@
$(Q) $(BOOTSTRAPRUBY) "$(tooldir)/generic_erb.rb" -o $@ $(srcdir)/template/verconf.h.tmpl

Expand Down
3 changes: 2 additions & 1 deletion complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "internal/array.h"
#include "internal/class.h"
#include "internal/complex.h"
#include "internal/error.h"
#include "internal/math.h"
#include "internal/numeric.h"
#include "internal/object.h"
Expand Down Expand Up @@ -2411,7 +2412,7 @@ nucomp_convert(VALUE klass, VALUE a1, VALUE a2, int raise)
{
if (NIL_P(a1) || NIL_P(a2)) {
if (!raise) return Qnil;
rb_raise(rb_eTypeError, "can't convert nil into Complex");
rb_cant_convert(Qnil, "Complex");
}

if (RB_TYPE_P(a1, T_STRING)) {
Expand Down
17 changes: 14 additions & 3 deletions defs/jit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUST_LIB_TOUCH = touch $@
# ld: warning: object file (target/debug/libjit.a(<libcapstone object>)) was built for
# newer macOS version (15.2) than being linked (15.0)
# This limits us to an older set of macOS API in the rust code, but we don't use any.
$(RUST_LIB): $(srcdir)/ruby.rs
$(RUST_LIB): $(srcdir)/ruby.rs target/.rustc-version
$(Q)if [ '$(ZJIT_SUPPORT)' != no -a '$(YJIT_SUPPORT)' != no ]; then \
echo 'building YJIT and ZJIT ($(JIT_CARGO_SUPPORT:yes=release) mode)'; \
elif [ '$(ZJIT_SUPPORT)' != no ]; then \
Expand All @@ -37,7 +37,7 @@ $(RUST_LIB): $(srcdir)/ruby.rs
$(RUST_LIB_TOUCH)
else ifneq ($(strip $(RLIB_DIR)),) # combo build

$(RUST_LIB): $(srcdir)/ruby.rs
$(RUST_LIB): $(srcdir)/ruby.rs target/.rustc-version
$(ECHO) 'building $(@F)'
$(gnumake_recursive)$(Q) $(RUSTC) --edition=2024 \
$(RUSTC_FLAGS) \
Expand All @@ -54,7 +54,7 @@ $(RUST_LIB): $(srcdir)/ruby.rs
JIT_RLIB = $(TOP_BUILD_DIR)/$(RLIB_DIR)/libjit.rlib
$(YJIT_RLIB): $(JIT_RLIB)
$(ZJIT_RLIB): $(JIT_RLIB)
$(JIT_RLIB):
$(JIT_RLIB): target/.rustc-version
$(ECHO) 'building $(@F)'
$(gnumake_recursive)$(Q) $(RUSTC) --crate-name=jit \
--edition=2024 \
Expand All @@ -77,6 +77,17 @@ endif
rust-libobj: $(RUST_LIBOBJ)
rust-lib: $(RUST_LIB)

rustc-version-check: target/.rustc-version

target/.rustc-version: PHONY
$(eval prev_version := $(if $(wildcard $@),$(shell cat $@)))
$(eval curr_version := $(shell $(RUSTC) -V | cut -d' ' -f2))
$(eval clean := $(filter-out $(prev_version),$(curr_version)))
$(if $(clean),$(ECHO) Cleaning $(@D) for rustc $(curr_version))
$(if $(clean),$(Q)$(RMALL) $(@D))
$(if $(clean),$(Q)$(MAKEDIRS) $(@D))
$(if $(clean),$(Q)echo $(curr_version) > $@)

# For Darwin only: a list of symbols that we want the glommed Rust static lib to export.
# Unfortunately, using wildcard like '_rb_*' with -exported-symbol does not work, at least
# not on version 820.1. Assume llvm-nm, so XCode 8.0 (from 2016) or newer.
Expand Down
6 changes: 6 additions & 0 deletions depend
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,7 @@ complex.$(OBJEXT): $(top_srcdir)/internal/box.h
complex.$(OBJEXT): $(top_srcdir)/internal/class.h
complex.$(OBJEXT): $(top_srcdir)/internal/compilers.h
complex.$(OBJEXT): $(top_srcdir)/internal/complex.h
complex.$(OBJEXT): $(top_srcdir)/internal/error.h
complex.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
complex.$(OBJEXT): $(top_srcdir)/internal/gc.h
complex.$(OBJEXT): $(top_srcdir)/internal/imemo.h
Expand Down Expand Up @@ -9963,6 +9964,7 @@ numeric.$(OBJEXT): $(top_srcdir)/internal/class.h
numeric.$(OBJEXT): $(top_srcdir)/internal/compilers.h
numeric.$(OBJEXT): $(top_srcdir)/internal/complex.h
numeric.$(OBJEXT): $(top_srcdir)/internal/enumerator.h
numeric.$(OBJEXT): $(top_srcdir)/internal/error.h
numeric.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
numeric.$(OBJEXT): $(top_srcdir)/internal/gc.h
numeric.$(OBJEXT): $(top_srcdir)/internal/hash.h
Expand Down Expand Up @@ -13221,6 +13223,7 @@ rational.$(OBJEXT): $(top_srcdir)/internal/box.h
rational.$(OBJEXT): $(top_srcdir)/internal/class.h
rational.$(OBJEXT): $(top_srcdir)/internal/compilers.h
rational.$(OBJEXT): $(top_srcdir)/internal/complex.h
rational.$(OBJEXT): $(top_srcdir)/internal/error.h
rational.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
rational.$(OBJEXT): $(top_srcdir)/internal/gc.h
rational.$(OBJEXT): $(top_srcdir)/internal/imemo.h
Expand All @@ -13231,6 +13234,7 @@ rational.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
rational.$(OBJEXT): $(top_srcdir)/internal/serial.h
rational.$(OBJEXT): $(top_srcdir)/internal/set_table.h
rational.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
rational.$(OBJEXT): $(top_srcdir)/internal/string.h
rational.$(OBJEXT): $(top_srcdir)/internal/variable.h
rational.$(OBJEXT): $(top_srcdir)/internal/vm.h
rational.$(OBJEXT): $(top_srcdir)/internal/warnings.h
Expand All @@ -13248,6 +13252,7 @@ rational.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
rational.$(OBJEXT): {$(VPATH)}config.h
rational.$(OBJEXT): {$(VPATH)}constant.h
rational.$(OBJEXT): {$(VPATH)}defines.h
rational.$(OBJEXT): {$(VPATH)}encindex.h
rational.$(OBJEXT): {$(VPATH)}encoding.h
rational.$(OBJEXT): {$(VPATH)}id.h
rational.$(OBJEXT): {$(VPATH)}id_table.h
Expand Down Expand Up @@ -17669,6 +17674,7 @@ time.$(OBJEXT): $(top_srcdir)/internal/bits.h
time.$(OBJEXT): $(top_srcdir)/internal/box.h
time.$(OBJEXT): $(top_srcdir)/internal/compar.h
time.$(OBJEXT): $(top_srcdir)/internal/compilers.h
time.$(OBJEXT): $(top_srcdir)/internal/error.h
time.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
time.$(OBJEXT): $(top_srcdir)/internal/gc.h
time.$(OBJEXT): $(top_srcdir)/internal/hash.h
Expand Down
2 changes: 1 addition & 1 deletion doc/language/option_dump.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Option `--dump`

For other argument values,
see {Option --dump}[options_md.html#label--dump-3A+Dump+Items].
see {Option `--dump`}[rdoc-ref:options.md@--dump+Dump+Items].

For the examples here, we use this program:

Expand Down
Loading