summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
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