Skip to content
Browse files

move version logic from ruby_debug.c to extconf.rb (because RUBY_VERS…

…ION_* may be undefined)
  • Loading branch information...
1 parent 220ad0f commit 582328f4f79c34b76e3434792ce9ff03d85d4ce5 @eregon eregon committed Feb 17, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −0 ext/ruby_debug/extconf.rb
  2. +0 −4 ext/ruby_debug/ruby_debug.c
View
4 ext/ruby_debug/extconf.rb
@@ -12,6 +12,10 @@
have_header("insns_info.inc") and have_header("eval_intern.h")
}
+if RUBY_VERSION == '1.9.1'
+ $CFLAGS << ' -DRUBY_VERSION_1_9_1'
+end
+
if RUBY_REVISION >= 26959 # rb_iseq_compile_with_option was added an argument filepath
$CFLAGS << ' -DRB_ISEQ_COMPILE_6ARGS'
end
View
4 ext/ruby_debug/ruby_debug.c
@@ -19,10 +19,6 @@
#define min(x,y) ((x) < (y) ? (x) : (y))
#endif
-#if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 9 && RUBY_VERSION_TEENY == 1 && RUBY_PATCHLEVEL >= 0
-#define RUBY_VERSION_1_9_1
-#endif
-
RUBY_EXTERN int rb_vm_get_sourceline(const rb_control_frame_t *cfp); /* from vm.c */
/* from iseq.c */

0 comments on commit 582328f

Please sign in to comment.
Something went wrong with that request. Please try again.