Skip to content

Commit 3e65920

Browse files
committed
Fix compilation for latest MRuby (deprecated macro)
1 parent 79f220b commit 3e65920

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/compiling-bytecode/compiling-bytecode.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ int main(int argc, char *argv[]) {
3838
struct RProc *proc = mrb_proc_ptr(result);
3939
const mrb_irep *irep = proc->body.irep;
4040

41-
// NOTE: DUMP_DEBUG_INFO is deprecated and used only for compatibility, in newer
41+
// NOTE: DUMP_DEBUG_INFO was deprecated in 3.3.0 and used only for compatibility, in newer
4242
// MRuby you should use MRB_DUMP_DEBUG_INFO
43+
#if MRUBY_RELEASE_MAJOR == 3 && MRUBY_RELEASE_MINOR < 3
4344
mrb_dump_irep_binary(mrb, irep, DUMP_DEBUG_INFO, output);
45+
#else
46+
mrb_dump_irep_binary(mrb, irep, MRB_DUMP_DEBUG_INFO, output);
47+
#endif
4448

4549
fclose(output);
4650
mrb_close(mrb);

0 commit comments

Comments
 (0)