Skip to content

Commit 05fefb4

Browse files
committed
move version logic from ruby_debug.c to extconf.rb (because RUBY_VERSION_* may be undefined) mark-moseley/ruby-debug@582328f
1 parent cae34b5 commit 05fefb4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/ruby_debug/extconf.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
have_header("insns_info.inc") and have_header("eval_intern.h")
1313
}
1414

15+
if RUBY_VERSION == '1.9.1'
16+
$CFLAGS << ' -DRUBY_VERSION_1_9_1'
17+
end
18+
1519
dir_config("ruby")
1620
if !Ruby_core_source::create_makefile_with_core(hdrs, "ruby_debug")
1721
STDERR.print("Makefile creation failed\n")

ext/ruby_debug/ruby_debug.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020

2121
#define STACK_SIZE_INCREMENT 128
2222

23-
#ifndef METHOD_H
24-
#define RUBY_VERSION_1_9_1
25-
#endif
26-
2723
RUBY_EXTERN int rb_vm_get_sourceline(const rb_control_frame_t *cfp); /* from vm.c */
2824
RUBY_EXTERN VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE line, VALUE opt); /* from iseq.c */
2925

0 commit comments

Comments
 (0)