summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-07-13 14:19:28 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-07-13 14:19:28 +0000
commitc0a9b71aeb96e5f9fd0c33c849bee236be828a84 (patch)
tree1b8a8a5de06aeeab93931a4d6e2a52b5a80d62cb /ext/extmk.rb.in
parentc4ef00b158e49999c147e5a2f779b5a3498277e3 (diff)
* lib/mkmf.rb: use File::split to split a target into a prefix and
a module name. This also works around a just found bug of String#rindex. * ext/extmk.rb.in: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 941d9d5..adbc350 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -362,9 +362,9 @@ end
def create_makefile(target)
$target = target
- if target.rindex(%r!/!)
- target = $'
- target_prefix = "/"+$`
+ if target.include?('/')
+ target_prefix, target = File.split(target)
+ target_prefix[0,0] = '/'
else
target_prefix = ""
end