summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-19 06:11:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-19 06:11:41 +0000
commitf35308b3ef20be1716660a751087b4e726db2171 (patch)
tree0a81f4109473d2c5746f12c65c9287ef06b5b1e0 /load.c
parent6d3ceb6ce38f91898dfc388fc96f5401ff3edc52 (diff)
* eval_intern.h (translit_char): moved from ruby.c.
* load.c (load_ext): transliterates file separators and back if needed. * symbian/setup (DLN_NEEDS_ALT_SEPARATOR): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/load.c b/load.c
index f642019053..5f72d5510a 100644
--- a/load.c
+++ b/load.c
@@ -529,8 +529,17 @@ load_failed(VALUE fname)
static VALUE
load_ext(VALUE path)
{
+ VALUE result;
+
SCOPE_SET(NOEX_PUBLIC);
- return (VALUE)dln_load(RSTRING_PTR(path));
+#if defined DLN_NEEDS_ALT_SEPARATOR && DLN_NEEDS_ALT_SEPARATOR
+ translit_char(RSTRING_PTR(path), '/', '\\');
+#endif
+ result = (VALUE)dln_load(RSTRING_PTR(path));
+#if defined DLN_NEEDS_ALT_SEPARATOR && DLN_NEEDS_ALT_SEPARATOR
+ translit_char(RSTRING_PTR(path), '\\', '/');
+#endif
+ return result;
}
VALUE