Skip to content

Commit 74c55a8

Browse files
committed
add some rvm lovin'
1 parent 0ab1323 commit 74c55a8

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

ext/ruby_debug/extconf.rb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
require "mkmf"
22
require "ruby_core_source"
33

4-
if RUBY_VERSION < "1.9"
5-
STDERR.print("Ruby version is too old\n")
6-
exit(1)
7-
end
8-
94
hdrs = proc {
105
have_struct_member("rb_method_entry_t", "body", "method.h")
116
have_header("vm_core.h") and have_header("iseq.h") and have_header("insns.inc") and
@@ -21,7 +16,17 @@
2116
end
2217

2318
dir_config("ruby")
24-
if !Ruby_core_source::create_makefile_with_core(hdrs, "ruby_debug")
19+
name = "ruby_debug"
20+
if (ENV['rvm_ruby_string'])
21+
dest_dir = Config::CONFIG["rubyhdrdir"]
22+
with_cppflags("-I" + dest_dir) {
23+
if hdrs.call
24+
create_makefile(name)
25+
exit 0
26+
end
27+
}
28+
end
29+
if !Ruby_core_source::create_makefile_with_core(hdrs, name)
2530
STDERR.print("Makefile creation failed\n")
2631
STDERR.print("*************************************************************\n\n")
2732
STDERR.print(" NOTE: For Ruby 1.9 installation instructions, please see:\n\n")

0 commit comments

Comments
 (0)